Skip to content

Commit 38a663a

Browse files
committed
Don't filter Core methods from newly-inferred list
Now that we re-export quite a lot from `Core` it seems sensible to remove. This allows constructors like `Tuple{Type{Vector{Foo}}, UndefInitializer, Tuple{Int}}` to precompile properly. Appears to have a minimal effect on the stdlib pkgimages: ```julia --- before.txt 2025-05-23 08:36:20.171870043 -0400 +++ after.txt 2025-05-22 14:48:49.003869097 -0400 @@ -47,7 +47,7 @@ 20K ../julia/usr/share/julia/compiled/v1.13/Logging/pkgimage.so 20K ../julia/usr/share/julia/compiled/v1.13/Logging/pkgimage.so 3.5M ../julia/usr/share/julia/compiled/v1.13/Markdown/pkgimage.so -3.6M ../julia/usr/share/julia/compiled/v1.13/Markdown/pkgimage.so +3.5M ../julia/usr/share/julia/compiled/v1.13/Markdown/pkgimage.so 184K ../julia/usr/share/julia/compiled/v1.13/Mmap/pkgimage.so 184K ../julia/usr/share/julia/compiled/v1.13/Mmap/pkgimage.so 28K ../julia/usr/share/julia/compiled/v1.13/MozillaCACerts_jll/pkgimage.so ```
1 parent 11292a9 commit 38a663a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/compiler/typeinfer.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ function cache_result!(interp::AbstractInterpreter, result::InferenceResult)
406406
code_cache(interp)[linfo] = ci = CodeInstance(interp, result, inferred_result, valid_worlds)
407407
if track_newly_inferred[]
408408
m = linfo.def
409-
if isa(m, Method) && m.module != Core
409+
if isa(m, Method)
410410
ccall(:jl_push_newly_inferred, Cvoid, (Any,), ci)
411411
end
412412
end

0 commit comments

Comments
 (0)