Skip to content

Commit

Permalink
updates to emit code
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeInnes committed Aug 22, 2018
1 parent 553db28 commit 6137cf3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/compiler/emit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function reverse_stacks!(adj, stks, nargs)
repl = Dict()
for (i, (b′, α)) in enumerate(stks)
b == b′ || continue
loc = max(2,range(ir.cfg.blocks[b])[1])
loc = max(2,afterphi(ir, range(ir.cfg.blocks[b])[1]))
if adj.perm[b′] == 1
val = insert_node!(ir, loc, Any, xcall(:getindex, t, i+nargs))
else
Expand Down
3 changes: 2 additions & 1 deletion src/compiler/interface2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ignore(T) = all(T -> T <: Type, T.parameters)
argnames!(meta, Symbol("#self#"), :ctx, :f, :args)
forw = varargs!(meta, forw, 3)
forw = inlineable!(forw)
usetyped || (forw = slots!(forw))
update!(meta, forw)
return meta.code
end
Expand All @@ -23,7 +24,7 @@ end
meta, _, back = g
resize!(back.argtypes, 2)
argnames!(meta, Symbol("#self#"), )
back = inlineable!(back)
back = slots!(inlineable!(back))
update!(meta, back)
if usetyped
# Enable type inference
Expand Down
1 change: 0 additions & 1 deletion src/tools/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ function varargs!(meta, ir::IRCode, n = 1)
end

function update!(meta, ir::IRCode)
usetyped || (ir = slots!(ir))
Core.Compiler.replace_code_newstyle!(meta.code, ir, length(ir.argtypes)-1)
usetyped || (meta.code.ssavaluetypes = length(meta.code.code))
slots!(meta.code)
Expand Down

0 comments on commit 6137cf3

Please sign in to comment.