@@ -485,7 +485,7 @@ occurs for "empty method" expressions, e.g., `:(function foo end)`. `pc` will be
485
485
By default the method will be defined (evaluated). You can prevent this by setting `define=false`.
486
486
This is recommended if you are simply extracting signatures from code that has already been evaluated.
487
487
"""
488
- function methoddef! (@nospecialize (recurse), signatures, frame:: Frame , @nospecialize (stmt), pc:: Int ; define= true )
488
+ function methoddef! (@nospecialize (recurse), signatures, frame:: Frame , @nospecialize (stmt), pc:: Int ; define:: Bool = true )
489
489
framecode, pcin = frame. framecode, pc
490
490
if ismethod3 (stmt)
491
491
pc3 = pc
@@ -656,12 +656,20 @@ if ccall(:jl_generating_output, Cint, ()) == 1
656
656
kwdefine = NamedTuple{(:define ,),Tuple{Bool}}
657
657
for ct in (Vector{Any}, Set{Any})
658
658
f = methoddef!
659
- @assert precompile (Tuple{typeof (f), Any, ct, Frame, Expr, Int})
660
- # @assert precompile(Tuple{Core.kwftype(typeof(f)), kwdefine, typeof(f), Any, ct, Frame, Expr, Int})
659
+ m = which (f, Tuple{Function, ct, Frame, Expr, Int})
660
+ @assert precompile (Tuple{typeof (f), Function, ct, Frame, Expr, Int})
661
+ mbody = bodymethod (m)
662
+ @assert precompile (Tuple{mbody. sig. parameters[1 ], Bool, typeof (f), Function, ct, Frame, Expr, Int})
663
+ @assert precompile (Tuple{Core. kwftype (typeof (f)), kwdefine, typeof (f), Function, ct, Frame, Expr, Int})
661
664
f = methoddefs!
662
665
@assert precompile (Tuple{typeof (f), Any, ct, Frame})
663
- # @assert precompile(Tuple{Core.kwftype(typeof(f)), kwdefine, typeof(f), Any , ct, Frame})
666
+ @assert precompile (Tuple{Core. kwftype (typeof (f)), kwdefine, typeof (f), Function , ct, Frame})
664
667
end
668
+ @assert precompile (Tuple{typeof (rename_framemethods!), Any, Frame, Dict{Symbol,MethodInfo},
669
+ Vector{NamedTuple{(:linetop , :linebody , :callee , :caller ),Tuple{Int64,Int64,Symbol,Union{Bool, Symbol}}}},
670
+ Dict{Symbol,Union{Bool, Symbol}}})
671
+ @assert precompile (Tuple{typeof (identify_framemethod_calls), Frame})
672
+ @assert precompile (Tuple{typeof (callchain), Vector{NamedTuple{(:linetop , :linebody , :callee , :caller ),Tuple{Int64,Int64,Symbol,Union{Bool, Symbol}}}}})
665
673
end
666
674
667
675
end # module
0 commit comments