From 2b11a60145d1164a3fd879309add4421b3a3b49d Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Sat, 20 May 2023 16:08:45 +0900 Subject: [PATCH] follow up #49889, pass `sv::AbsIntState` to `concrete_eval_call` (#49904) `sv` is not used by `NativeInterpreter`, but is used by external `AbstractInterpreter` like JET.jl. --- base/compiler/abstractinterpretation.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 1c00c684a877bb..9f23bf3a05b7e2 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -792,7 +792,7 @@ function abstract_call_method_with_const_args(interp::AbstractInterpreter, end eligibility = concrete_eval_eligible(interp, f, result, arginfo, sv) if eligibility === :concrete_eval - return concrete_eval_call(interp, f, result, arginfo, invokecall) + return concrete_eval_call(interp, f, result, arginfo, sv, invokecall) end mi = maybe_get_const_prop_profitable(interp, result, f, arginfo, si, match, sv) mi === nothing && return nothing @@ -880,7 +880,8 @@ function collect_const_args(argtypes::Vector{Any}, start::Int) end function concrete_eval_call(interp::AbstractInterpreter, - @nospecialize(f), result::MethodCallResult, arginfo::ArgInfo, invokecall::Union{InvokeCall,Nothing}) + @nospecialize(f), result::MethodCallResult, arginfo::ArgInfo, + sv::AbsIntState, invokecall::Union{InvokeCall,Nothing}) args = collect_const_args(arginfo, #=start=#2) if invokecall !== nothing # this call should be `invoke`d, rewrite `args` back now