@@ -2969,13 +2969,14 @@ end
2969
2969
# a simplified model of abstract_call_gf_by_type for applicable
2970
2970
function abstract_applicable (interp:: AbstractInterpreter , argtypes:: Vector{Any} ,
2971
2971
sv:: AbsIntState , max_methods:: Int )
2972
- length (argtypes) < 2 && return CallMeta (Bottom, Any , EFFECTS_THROWS, NoCallInfo ())
2973
- isvarargtype (argtypes[2 ]) && return CallMeta (Bool, Any , EFFECTS_THROWS, NoCallInfo ())
2972
+ length (argtypes) < 2 && return CallMeta (Bottom, ArgumentError , EFFECTS_THROWS, NoCallInfo ())
2973
+ isvarargtype (argtypes[2 ]) && return CallMeta (Bool, ArgumentError , EFFECTS_THROWS, NoCallInfo ())
2974
2974
argtypes = argtypes[2 : end ]
2975
2975
atype = argtypes_to_type (argtypes)
2976
2976
matches = find_method_matches (interp, argtypes, atype; max_methods)
2977
2977
if isa (matches, FailedMethodMatch)
2978
2978
rt = Bool # too many matches to analyze
2979
+ info = NoCallInfo ()
2979
2980
else
2980
2981
(; valid_worlds, applicable) = matches
2981
2982
update_valid_age! (sv, valid_worlds)
@@ -2988,9 +2989,9 @@ function abstract_applicable(interp::AbstractInterpreter, argtypes::Vector{Any},
2988
2989
else
2989
2990
rt = Const (true ) # has applicable matches
2990
2991
end
2991
- add_edges! (sv . edges, matches. info)
2992
+ info = MethodResultPure ( matches. info) # XXX this should probably be something like `VirtualizedCallInfo`
2992
2993
end
2993
- return CallMeta (rt, Union{}, EFFECTS_TOTAL, NoCallInfo () )
2994
+ return CallMeta (rt, Union{}, EFFECTS_TOTAL, info )
2994
2995
end
2995
2996
add_tfunc (applicable, 1 , INT_INF, @nospecs ((𝕃:: AbstractLattice , f, args... )-> Bool), 40 )
2996
2997
@@ -3024,15 +3025,14 @@ function _hasmethod_tfunc(interp::AbstractInterpreter, argtypes::Vector{Any}, sv
3024
3025
update_valid_age! (sv, valid_worlds)
3025
3026
if match === nothing
3026
3027
rt = Const (false )
3027
- let vresults = MethodLookupResult (Any[], valid_worlds, true )
3028
- vinfo = MethodMatchInfo (vresults, mt, types, false )
3029
- add_edges! (sv. edges, vinfo) # XXX : this should actually be an invoke-type backedge
3030
- end
3028
+ vresults = MethodLookupResult (Any[], valid_worlds, true )
3029
+ vinfo = MethodMatchInfo (vresults, mt, types, false ) # XXX : this should actually be an info with invoke-type edge
3031
3030
else
3032
3031
rt = Const (true )
3033
- add_edges! (sv . edges, InvokeCallInfo (match, nothing , types) )
3032
+ vinfo = InvokeCallInfo (match, nothing , types)
3034
3033
end
3035
- return CallMeta (rt, Any, EFFECTS_TOTAL, NoCallInfo ())
3034
+ info = MethodResultPure (vinfo) # XXX this should probably be something like `VirtualizedCallInfo`
3035
+ return CallMeta (rt, Union{}, EFFECTS_TOTAL, info)
3036
3036
end
3037
3037
3038
3038
# N.B.: typename maps type equivalence classes to a single value
0 commit comments