Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSA optimized gensyms #9729

Merged
merged 20 commits into from
Jan 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4e6e1f4
wip: syntax elements of efficient indexed gensym variables
vtjnash Jan 7, 2015
d52667b
wip: teach inference about the new GenSym type
vtjnash Jan 9, 2015
77d1394
in flisp syntax converter, block (jlgensym) from being considered for…
vtjnash Jan 9, 2015
df0e099
wip: teach codegen about the GenSym type
vtjnash Jan 10, 2015
a89443f
wip: renumber GenSym nodes in expand to always be lowest consecutive
vtjnash Jan 10, 2015
192af7f
wip: have inference assume the new attribute is present, rather than …
vtjnash Jan 10, 2015
05d2171
wip: corrections to typeinference handling of new GenSym type
vtjnash Jan 10, 2015
cc19144
wip: more corrections and improvements to codegens handling of new Ge…
vtjnash Jan 10, 2015
6744e31
fix several more codegen issues
vtjnash Jan 11, 2015
3f26600
revert making Type{()} a bitstype since this cause ambiguity. also fi…
vtjnash Jan 11, 2015
6aaa56d
fix miscount in gensym_SAvalues creation
vtjnash Jan 11, 2015
cee390d
trust that type-inference marked the arg type correctly
vtjnash Jan 11, 2015
c367be3
add gensym box cache and create a (symbol-like?) function for testing…
vtjnash Jan 22, 2015
8d77889
handle GenSym objects in interpreted code, correct issues with julia-…
vtjnash Jan 23, 2015
bdb7609
fix more tests of GenSym operation (esp. comprehensions, and type_goto)
vtjnash Jan 24, 2015
0dc1017
fix massive performance regression caused by placing jlgensym in stat…
vtjnash Jan 24, 2015
5732794
convert scm code leading tabs to spaces
vtjnash Jan 24, 2015
f259fe2
ensure macros output unique GenSym objects also
vtjnash Jan 24, 2015
8b76d41
fix win32 build
vtjnash Jan 24, 2015
d0fa2db
cleanup, per Jeff's comments
vtjnash Jan 25, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
*.dSYM
*.jl.cov
*.jl.mem
*.ji

.DS_Store
1 change: 1 addition & 0 deletions base/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ call(T::Type{NewvarNode}, s::Symbol) = Core.call(T, s)
call(T::Type{TopNode}, s::Symbol) = Core.call(T, s)
call(T::Type{Module}, args...) = Core.call(T, args...)
call(T::Type{Task}, f::ANY) = Core.call(T, f)
call(T::Type{GenSym}, n::Int) = Core.call(T, n)

call{T}(::Type{T}, args...) = convert(T, args...)::T

Expand Down
3 changes: 2 additions & 1 deletion base/boot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export
AbstractArray, DenseArray,
# special objects
Box, Function, IntrinsicFunction, LambdaStaticData, Method, MethodTable,
Module, Symbol, Task, Array,
Module, Symbol, Task, Array, GenSym,
# numeric types
Bool, FloatingPoint, Float16, Float32, Float64, Number, Integer, Int, Int8, Int16,
Int32, Int64, Int128, Ptr, Real, Signed, UInt, UInt8, UInt16, UInt32,
Expand Down Expand Up @@ -274,6 +274,7 @@ _new(:GotoNode, :Int)
_new(:TopNode, :Symbol)
_new(:NewvarNode, :Symbol)
_new(:QuoteNode, :ANY)
_new(:GenSym, :Int)

Module(name::Symbol) = ccall(:jl_f_new_module, Any, (Any,), name)::Module
Module() = Module(:anonymous)
Expand Down
2 changes: 2 additions & 0 deletions base/expr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ gensym(s::UTF8String) = gensym(s.data)
gensym(a::Array{UInt8,1}) =
ccall(:jl_tagged_gensym, Any, (Ptr{UInt8}, Int32), a, length(a))::Symbol
gensym(ss::Union(ASCIIString, UTF8String)...) = map(gensym, ss)
gensym(s::Symbol) =
ccall(:jl_tagged_gensym, Any, (Ptr{UInt8}, Int32), s, ccall(:strlen, Csize_t, (Ptr{UInt8},), s))::Symbol

macro gensym(names...)
blk = Expr(:block)
Expand Down
Loading