Skip to content

Commit

Permalink
One more bugfix from #26969
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno committed May 11, 2018
1 parent c43d3b0 commit 3b5e180
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions base/compiler/ssair/inlining2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@ function assemble_inline_todo!(ir::IRCode, linetable::Vector{LineInfoNode}, sv::
# Now, if profitable union split the atypes into dispatch tuples and match the appropriate method
nu = countunionsplit(atypes)
if nu != 1 && nu <= sv.params.MAX_UNION_SPLITTING
fully_covered = true
for sig in UnionSplitSignature(atypes)
metharg′ = argtypes_to_type(sig)
if !isdispatchtuple(metharg′)
Expand Down
4 changes: 2 additions & 2 deletions base/compiler/ssair/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function Base.show(io::IO, code::IRCode)
end
new_nodes = code.new_nodes[filter(i->isassigned(code.new_nodes, i), 1:length(code.new_nodes))]
foreach(nn -> scan_ssa_use!(used, nn.node), new_nodes)
perm = sortperm(new_nodes, by = x->x[1])
perm = sortperm(new_nodes, by = x->x.pos)
new_nodes_perm = Iterators.Stateful(perm)

if isempty(used)
Expand Down Expand Up @@ -122,7 +122,7 @@ function Base.show(io::IO, code::IRCode)
print_sep = true
end
floop = true
while !isempty(new_nodes_perm) && new_nodes[peek(new_nodes_perm)][1] == idx
while !isempty(new_nodes_perm) && new_nodes[peek(new_nodes_perm)].pos == idx
node_idx = popfirst!(new_nodes_perm)
new_node = new_nodes[node_idx]
node_idx += length(code.stmts)
Expand Down

0 comments on commit 3b5e180

Please sign in to comment.