@@ -394,37 +394,36 @@ in_sysimage(pkgid::PkgId) = pkgid in _sysimage_modules
394394# Precompiles for Revise
395395# TODO : move these to contrib/generate_precompile.jl
396396# The problem is they don't work there
397- let m = which (+ , (Int, Int))
398- while true # defeat interpreter heuristic to force compilation
399- delete! (push! (Set {Method} (), m), m)
400- copy (Core. Compiler. retrieve_code_info (Core. Compiler. specialize_method (m, [Int, Int], Core. svec ())))
401-
402- empty! (Set ())
403- push! (push! (Set {Union{GlobalRef,Symbol}} (), :two ), GlobalRef (Base, :two ))
404- (setindex! (Dict {String,Base.PkgId} (), Base. PkgId (Base), " file.jl" ))[" file.jl" ]
405- (setindex! (Dict {Symbol,Vector{Int}} (), [1 ], :two ))[:two ]
406- (setindex! (Dict {Base.PkgId,String} (), " file.jl" , Base. PkgId (Base)))[Base. PkgId (Base)]
407- (setindex! (Dict {Union{GlobalRef,Symbol}, Vector{Int}} (), [1 ], :two ))[:two ]
408- (setindex! (IdDict{Type, Union{Missing, Vector{Tuple{LineNumberNode, Expr}}}}(), missing , Int))[Int]
409- Dict {Symbol, Union{Nothing, Bool, Symbol}} (:one => false )[:one ]
410- Dict (Base => [:(1 + 1 )])[Base]
411- Dict (:one => [1 ])[:one ]
412- Dict (" abc" => Set ())[" abc" ]
413- pushfirst! ([], sum)
414- get (Base. pkgorigins, Base. PkgId (Base), nothing )
415- sort! ([1 ,2 ,3 ])
416- unique! ([1 ,2 ,3 ])
417- cumsum ([1 ,2 ,3 ])
418- append! (Int[], BitSet ())
419- isempty (BitSet ())
420- delete! (BitSet ([1 ,2 ]), 3 )
421- deleteat! (Int32[1 ,2 ,3 ], [1 ,3 ])
422- deleteat! (Any[1 ,2 ,3 ], [1 ,3 ])
423- Core. svec (1 , 2 ) == Core. svec (3 , 4 )
424- any (t-> t[1 ]. line > 1 , [(LineNumberNode (2 ,:none ), :(1 + 1 ))])
425-
426- break # end defeat interpreter heuristic
427- end
397+ for match = _methods (+ , (Int, Int), - 1 , get_world_counter ())
398+ m = match. method
399+ delete! (push! (Set {Method} (), m), m)
400+ copy (Core. Compiler. retrieve_code_info (Core. Compiler. specialize_method (match)))
401+
402+ empty! (Set ())
403+ push! (push! (Set {Union{GlobalRef,Symbol}} (), :two ), GlobalRef (Base, :two ))
404+ (setindex! (Dict {String,Base.PkgId} (), Base. PkgId (Base), " file.jl" ))[" file.jl" ]
405+ (setindex! (Dict {Symbol,Vector{Int}} (), [1 ], :two ))[:two ]
406+ (setindex! (Dict {Base.PkgId,String} (), " file.jl" , Base. PkgId (Base)))[Base. PkgId (Base)]
407+ (setindex! (Dict {Union{GlobalRef,Symbol}, Vector{Int}} (), [1 ], :two ))[:two ]
408+ (setindex! (IdDict{Type, Union{Missing, Vector{Tuple{LineNumberNode, Expr}}}}(), missing , Int))[Int]
409+ Dict {Symbol, Union{Nothing, Bool, Symbol}} (:one => false )[:one ]
410+ Dict (Base => [:(1 + 1 )])[Base]
411+ Dict (:one => [1 ])[:one ]
412+ Dict (" abc" => Set ())[" abc" ]
413+ pushfirst! ([], sum)
414+ get (Base. pkgorigins, Base. PkgId (Base), nothing )
415+ sort! ([1 ,2 ,3 ])
416+ unique! ([1 ,2 ,3 ])
417+ cumsum ([1 ,2 ,3 ])
418+ append! (Int[], BitSet ())
419+ isempty (BitSet ())
420+ delete! (BitSet ([1 ,2 ]), 3 )
421+ deleteat! (Int32[1 ,2 ,3 ], [1 ,3 ])
422+ deleteat! (Any[1 ,2 ,3 ], [1 ,3 ])
423+ Core. svec (1 , 2 ) == Core. svec (3 , 4 )
424+ any (t-> t[1 ]. line > 1 , [(LineNumberNode (2 ,:none ), :(1 + 1 ))])
425+
426+ break # only actually need to do this once
428427end
429428
430429if is_primary_base_module
0 commit comments