https://github.com/JuliaLang/julia
Revision fb3ee73ec749c035b5e8ffe613b52c2c67987d23 authored by Shuhei Kadowaki on 20 December 2021, 08:44:38 UTC, committed by GitHub on 20 December 2021, 08:44:38 UTC
Looking at the result of <https://github.com/JuliaLang/julia/issues/43452#issuecomment-996971256>,
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
```
1 parent 4409c82
History
Tip revision: fb3ee73ec749c035b5e8ffe613b52c2c67987d23 authored by Shuhei Kadowaki on 20 December 2021, 08:44:38 UTC
inlining: add missing late special handling for `UnionAll` method call (#43479)
Tip revision: fb3ee73
File Mode Size
.buildkite
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.clang-format -rw-r--r-- 3.3 KB
.codecov.yml -rw-r--r-- 52 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 433 bytes
.mailmap -rw-r--r-- 11.1 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 942 bytes
CONTRIBUTING.md -rw-r--r-- 22.5 KB
HISTORY.md -rw-r--r-- 333.2 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 49.2 KB
Makefile -rw-r--r-- 25.6 KB
NEWS.md -rw-r--r-- 7.5 KB
README.md -rw-r--r-- 7.4 KB
THIRDPARTY.md -rw-r--r-- 3.6 KB
VERSION -rw-r--r-- 10 bytes
sysimage.mk -rw-r--r-- 4.0 KB

README.md

back to top