Skip to content

Commit

Permalink
avoid forming Tuple{Union(), ...}, which was confusing codegen.
Browse files Browse the repository at this point in the history
see comment in #11100

ideally, any Tuple containing Union() should collapse to Union(), but
I will just put a bandaid on this for now.
  • Loading branch information
JeffBezanson committed May 26, 2015
1 parent adf2624 commit 4d9bc85
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions base/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -619,10 +619,12 @@ function abstract_call_gf(f, fargs, argtype, e)
return getfield_tfunc(fargs, argtypes[1], argtypes[2])[1]
elseif istopfunction(tm, f, :next)
isa(e,Expr) && (e.head = :call1)
return Tuple{getfield_tfunc(fargs, argtypes[1], argtypes[2])[1], Int}
t1 = getfield_tfunc(fargs, argtypes[1], argtypes[2])[1]
return t1===Bottom ? Bottom : Tuple{t1, Int}
elseif istopfunction(tm, f, :indexed_next)
isa(e,Expr) && (e.head = :call1)
return Tuple{getfield_tfunc(fargs, argtypes[1], argtypes[2])[1], Int}
t1 = getfield_tfunc(fargs, argtypes[1], argtypes[2])[1]
return t1===Bottom ? Bottom : Tuple{t1, Int}
end
end
if istopfunction(tm, f, :promote_type) || istopfunction(tm, f, :typejoin)
Expand Down

2 comments on commit 4d9bc85

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes an MSVC build freeze during first-stage bootstrap, oddly. Maybe an LLVM bug since it seems fine everywhere else.

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems better now, wonder what fixed it

Please sign in to comment.