Skip to content

Commit

Permalink
only run if generating output and pkgimages enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Sep 16, 2024
1 parent e692e27 commit e4f5053
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions stdlib/REPL/src/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -188,24 +188,25 @@ let
end
end

Core.Compiler.Timings.reset_timings()
Core.Compiler.__set_measure_typeinf(true)
try
repl_workload()
finally
Core.Compiler.__set_measure_typeinf(false)
Core.Compiler.Timings.close_current_timer()
end
roots = Core.Compiler.Timings._timings[1].children
for child in roots
precompile(child.mi_info.mi.specTypes)
check_edges(child)
if Base.generating_output() && Base.JLOptions().use_pkgimages != 0
Core.Compiler.Timings.reset_timings()
Core.Compiler.__set_measure_typeinf(true)
try
repl_workload()
finally
Core.Compiler.__set_measure_typeinf(false)
Core.Compiler.Timings.close_current_timer()
end
roots = Core.Compiler.Timings._timings[1].children
for child in roots
precompile(child.mi_info.mi.specTypes)
check_edges(child)
end
precompile(Tuple{typeof(Base.setindex!), Base.Dict{Any, Any}, Any, Int})
precompile(Tuple{typeof(Base.delete!), Base.Set{Any}, String})
precompile(Tuple{typeof(Base.:(==)), Char, String})
precompile(Tuple{typeof(Base.reseteof), Base.TTY})
end
end

precompile(Tuple{typeof(Base.setindex!), Base.Dict{Any, Any}, Any, Int})
precompile(Tuple{typeof(Base.delete!), Base.Set{Any}, String})
precompile(Tuple{typeof(Base.:(==)), Char, String})
precompile(Tuple{typeof(Base.reseteof), Base.TTY})

end # Precompile

0 comments on commit e4f5053

Please sign in to comment.