Skip to content

Commit

Permalink
Merge pull request #18046 from JuliaLang/jb/17932
Browse files Browse the repository at this point in the history
fall back to dynamic dispatch in union-splitting optimization
  • Loading branch information
JeffBezanson authored Aug 22, 2016
2 parents 3daaf4f + b0cf591 commit 969203a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions base/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const MAX_TUPLETYPE_LEN = 15
const MAX_TUPLE_DEPTH = 4

const MAX_TUPLE_SPLAT = 16
const MAX_UNION_SPLITTING = 6
const MAX_UNION_SPLITTING = 4
const UNION_SPLIT_MISMATCH_ERROR = false

# alloc_elim_pass! relies on `Slot_AssignedOnce | Slot_UsedUndef` being
# SSA. This should be true now but can break if we start to track conditional
Expand Down Expand Up @@ -2437,7 +2438,7 @@ function inlineable(f::ANY, ft::ANY, e::Expr, atypes::Vector{Any}, sv::Inference
all = false
end
end
if all
if UNION_SPLIT_MISMATCH_ERROR && all
error_label === nothing && (error_label = genlabel(sv))
push!(stmts, GotoNode(error_label.label))
else
Expand Down

0 comments on commit 969203a

Please sign in to comment.