julia
a1d0ba6a - Stop removing functions without proving them nothrow in inlining

Commit
8 years ago
Stop removing functions without proving them nothrow in inlining E.g., consider ``` struct Foo{T}; x::T; end f(b) = fieldtype(b ? Int : Foo{Int}, 1) ``` We can conclude that f always returns `Int`. However, we cannot remove the fieldtype call, because it throws for `b === true`. We are a bit lucky in that our tfuncs are currently fairly imprecise in the cases where this would cause problems, largely masking the bug. This is essentially a generalization of #27912. As our tfuncs get more precise, this will get more and more important for correctness.
Author
Committer
Parents
Loading