@@ -572,7 +572,7 @@ function abstract_call_method(interp::AbstractInterpreter, method::Method, @nosp
572572 break
573573 end
574574 topmost === nothing || continue
575- if edge_matches_sv (interp, infstate, method, sig, sparams, hardlimit, sv)
575+ if edge_matches_sv (infstate, method, sig, sparams, hardlimit, sv)
576576 topmost = infstate
577577 edgecycle = true
578578 end
@@ -680,13 +680,12 @@ function abstract_call_method(interp::AbstractInterpreter, method::Method, @nosp
680680 return MethodCallResult (rt, edgecycle, edgelimited, edge, effects)
681681end
682682
683- function edge_matches_sv (interp :: AbstractInterpreter , frame:: InferenceState , method:: Method , @nospecialize (sig), sparams:: SimpleVector , hardlimit:: Bool , sv:: InferenceState )
683+ function edge_matches_sv (frame:: InferenceState , method:: Method , @nospecialize (sig), sparams:: SimpleVector , hardlimit:: Bool , sv:: InferenceState )
684684 # The `method_for_inference_heuristics` will expand the given method's generator if
685685 # necessary in order to retrieve this field from the generated `CodeInfo`, if it exists.
686686 # The other `CodeInfo`s we inspect will already have this field inflated, so we just
687687 # access it directly instead (to avoid regeneration).
688- world = get_world_counter (interp)
689- callee_method2 = method_for_inference_heuristics (method, sig, sparams, world) # Union{Method, Nothing}
688+ callee_method2 = method_for_inference_heuristics (method, sig, sparams) # Union{Method, Nothing}
690689
691690 inf_method2 = frame. src. method_for_inference_limit_heuristics # limit only if user token match
692691 inf_method2 isa Method || (inf_method2 = nothing )
@@ -723,11 +722,11 @@ function edge_matches_sv(interp::AbstractInterpreter, frame::InferenceState, met
723722end
724723
725724# This function is used for computing alternate limit heuristics
726- function method_for_inference_heuristics (method:: Method , @nospecialize (sig), sparams:: SimpleVector , world :: UInt )
727- if isdefined (method, :generator ) && ! ( method. generator isa Core . GeneratedFunctionStub) && may_invoke_generator (method, sig, sparams)
725+ function method_for_inference_heuristics (method:: Method , @nospecialize (sig), sparams:: SimpleVector )
726+ if isdefined (method, :generator ) && method. generator. expand_early && may_invoke_generator (method, sig, sparams)
728727 method_instance = specialize_method (method, sig, sparams)
729728 if isa (method_instance, MethodInstance)
730- cinfo = get_staged (method_instance, world )
729+ cinfo = get_staged (method_instance)
731730 if isa (cinfo, CodeInfo)
732731 method2 = cinfo. method_for_inference_limit_heuristics
733732 if method2 isa Method
0 commit comments