Skip to content

Commit 8284663

Browse files
add some loading precompiles
1 parent bb28ea8 commit 8284663

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

contrib/generate_precompile.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,22 @@ hardcoded_precompile_statements = """
3434
precompile(Base.unsafe_string, (Ptr{UInt8},))
3535
precompile(Base.unsafe_string, (Ptr{Int8},))
3636
37-
# loading.jl
37+
# loading.jl - without these each precompile worker would precompile these because they're hit before pkgimages are loaded
3838
precompile(Base.__require, (Module, Symbol))
3939
precompile(Base.__require, (Base.PkgId,))
4040
precompile(Base.indexed_iterate, (Pair{Symbol, Union{Nothing, String}}, Int))
4141
precompile(Base.indexed_iterate, (Pair{Symbol, Union{Nothing, String}}, Int, Int))
4242
precompile(Tuple{typeof(Base.Threads.atomic_add!), Base.Threads.Atomic{Int}, Int})
4343
precompile(Tuple{typeof(Base.Threads.atomic_sub!), Base.Threads.Atomic{Int}, Int})
44+
precompile(Tuple{Type{Pair{A, B} where B where A}, Base.PkgId, UInt128})
45+
precompile(Tuple{typeof(Base.in!), Tuple{Module, String, UInt64, UInt32, Float64}, Base.Set{Any}})
46+
precompile(Tuple{typeof(Core.kwcall), NamedTuple{(:allow_typevars, :volatile_inf_result), Tuple{Bool, Nothing}}, typeof(Base.Compiler.handle_match!), Array{Base.Compiler.InliningCase, 1}, Core.MethodMatch, Array{Any, 1}, Base.Compiler.CallInfo, UInt32, Base.Compiler.InliningState{Base.Compiler.NativeInterpreter}})
47+
precompile(Tuple{typeof(Base.Compiler.ir_to_codeinf!), Base.Compiler.OptimizationState{Base.Compiler.NativeInterpreter}})
48+
precompile(Tuple{typeof(Core.kwcall), NamedTuple{(:allow_typevars, :volatile_inf_result), Tuple{Bool, Base.Compiler.VolatileInferenceResult}}, typeof(Base.Compiler.handle_match!), Array{Base.Compiler.InliningCase, 1}, Core.MethodMatch, Array{Any, 1}, Base.Compiler.CallInfo, UInt32, Base.Compiler.InliningState{Base.Compiler.NativeInterpreter}})
49+
precompile(Tuple{typeof(Base.getindex), Type{Pair{Base.PkgId, UInt128}}, Pair{Base.PkgId, UInt128}, Pair{Base.PkgId, UInt128}, Pair{Base.PkgId, UInt128}, Vararg{Pair{Base.PkgId, UInt128}}})
50+
precompile(Tuple{typeof(Base.Compiler.ir_to_codeinf!), Base.Compiler.OptimizationState{Base.Compiler.NativeInterpreter}, Core.SimpleVector})
51+
precompile(Tuple{typeof(Base.Compiler.ir_to_codeinf!), Base.Compiler.OptimizationState{Base.Compiler.NativeInterpreter}})
52+
precompile(Tuple{Base.IncludeInto, RelocatableFolders.Path})
4453
4554
# LazyArtifacts (but more generally helpful)
4655
precompile(Tuple{Type{Base.Val{x} where x}, Module})
@@ -215,6 +224,7 @@ if Artifacts !== nothing
215224
"""
216225
hardcoded_precompile_statements *= """
217226
precompile(Tuple{typeof(Artifacts._artifact_str), Module, String, Base.SubString{String}, String, Base.Dict{String, Any}, Base.SHA1, Base.BinaryPlatforms.Platform, Base.Val{Artifacts}})
227+
precompile(Tuple{typeof(Base.tryparse), Type{Base.BinaryPlatforms.Platform}, String})
218228
"""
219229
end
220230

0 commit comments

Comments
 (0)