forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inlining: add missing late special handling for
UnionAll
method call (
JuliaLang#43479) Looking at the result of <JuliaLang#43452 (comment)>, I found that currently the inlinear sometimes fails to handle `UnionAll` call (e.g. runtime dispatch detected: Core.UnionAll(%28::TypeVar, %29::Any)). This commit adds a missing late special handling for `UnionAll` calls: > before ```julia julia> code_typed((TypeVar,)) do tv UnionAll(tv, Type{tv}) end 1-element Vector{Any}: CodeInfo( 1 ─ %1 = Core.apply_type(Main.Type, tv)::Type{Type{_A}} where _A │ %2 = Main.UnionAll(tv, %1)::Any └── return %2 ) => Any ``` > after ```julia julia> code_typed((TypeVar,)) do tv UnionAll(tv, Type{tv}) end 1-element Vector{Any}: CodeInfo( 1 ─ %1 = Core.apply_type(Main.Type, tv)::Type{Type{_A}} where _A │ %2 = $(Expr(:foreigncall, :(:jl_type_unionall), Any, svec(Any, Any), 0, :(:ccall), Core.Argument(2), :(%1)))::Any └── return %2 ) => Any ```
- Loading branch information
1 parent
3fb337c
commit 9eb8c16
Showing
2 changed files
with
61 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters