@@ -569,7 +569,7 @@ function abstract_call_method(interp::AbstractInterpreter, method::Method, @nosp
569569 break
570570 end
571571 topmost === nothing || continue
572- if edge_matches_sv (interp, infstate, method, sig, sparams, hardlimit, sv)
572+ if edge_matches_sv (infstate, method, sig, sparams, hardlimit, sv)
573573 topmost = infstate
574574 edgecycle = true
575575 end
@@ -677,13 +677,12 @@ function abstract_call_method(interp::AbstractInterpreter, method::Method, @nosp
677677 return MethodCallResult (rt, edgecycle, edgelimited, edge, effects)
678678end
679679
680- function edge_matches_sv (interp :: AbstractInterpreter , frame:: InferenceState , method:: Method , @nospecialize (sig), sparams:: SimpleVector , hardlimit:: Bool , sv:: InferenceState )
680+ function edge_matches_sv (frame:: InferenceState , method:: Method , @nospecialize (sig), sparams:: SimpleVector , hardlimit:: Bool , sv:: InferenceState )
681681 # The `method_for_inference_heuristics` will expand the given method's generator if
682682 # necessary in order to retrieve this field from the generated `CodeInfo`, if it exists.
683683 # The other `CodeInfo`s we inspect will already have this field inflated, so we just
684684 # access it directly instead (to avoid regeneration).
685- world = get_world_counter (interp)
686- callee_method2 = method_for_inference_heuristics (method, sig, sparams, world) # Union{Method, Nothing}
685+ callee_method2 = method_for_inference_heuristics (method, sig, sparams) # Union{Method, Nothing}
687686
688687 inf_method2 = frame. src. method_for_inference_limit_heuristics # limit only if user token match
689688 inf_method2 isa Method || (inf_method2 = nothing )
@@ -720,11 +719,11 @@ function edge_matches_sv(interp::AbstractInterpreter, frame::InferenceState, met
720719end
721720
722721# This function is used for computing alternate limit heuristics
723- function method_for_inference_heuristics (method:: Method , @nospecialize (sig), sparams:: SimpleVector , world :: UInt )
724- if isdefined (method, :generator ) && ! ( method. generator isa Core . GeneratedFunctionStub) && may_invoke_generator (method, sig, sparams)
722+ function method_for_inference_heuristics (method:: Method , @nospecialize (sig), sparams:: SimpleVector )
723+ if isdefined (method, :generator ) && method. generator. expand_early && may_invoke_generator (method, sig, sparams)
725724 method_instance = specialize_method (method, sig, sparams)
726725 if isa (method_instance, MethodInstance)
727- cinfo = get_staged (method_instance, world )
726+ cinfo = get_staged (method_instance)
728727 if isa (cinfo, CodeInfo)
729728 method2 = cinfo. method_for_inference_limit_heuristics
730729 if method2 isa Method
0 commit comments