Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inlining: add missing late special handling for UnionAll method call #43479

Merged
merged 2 commits into from
Dec 20, 2021

Commits on Dec 19, 2021

  1. inlining: add missing late special handling for UnionAll method call

    Looking at the result of <#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
    ```
    aviatesk committed Dec 19, 2021
    Configuration menu
    Copy the full SHA
    d959b43 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2021

  1. Configuration menu
    Copy the full SHA
    e2810a0 View commit details
    Browse the repository at this point in the history