diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index bce0a1ce0709a..a33488a2f32d8 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -803,10 +803,8 @@ function collect_const_args(argtypes::Vector{Any}) end function invoke_signature(invokesig::Vector{Any}) - unwrapconst(x) = isa(x, Const) ? x.val : x - - f, argtyps = unwrapconst(invokesig[2]), unwrapconst(invokesig[3]) - return Tuple{typeof(f), unwrap_unionall(argtyps).parameters...} + ft, argtyps = widenconst(invokesig[2]), instanceof_tfunc(widenconst(invokesig[3]))[1] + return rewrap_unionall(Tuple{typeof(f), unwrap_unionall(argtyps).parameters...}, argtyps) end function concrete_eval_call(interp::AbstractInterpreter, @@ -1627,7 +1625,7 @@ function abstract_invoke(interp::AbstractInterpreter, (; fargs, argtypes)::ArgIn ti = tienv[1]; env = tienv[2]::SimpleVector result = abstract_call_method(interp, method, ti, env, false, sv) (; rt, edge, effects) = result - edge !== nothing && add_backedge!(edge::MethodInstance, sv, argtypes) + edge !== nothing && add_backedge!(edge::MethodInstance, sv, types) match = MethodMatch(ti, env, method, argtype <: method.sig) res = nothing sig = match.spec_types diff --git a/base/compiler/utilities.jl b/base/compiler/utilities.jl index e554ac39ea2d2..f9ad78d566be5 100644 --- a/base/compiler/utilities.jl +++ b/base/compiler/utilities.jl @@ -268,10 +268,6 @@ end const empty_backedge_iter = BackedgeIterator(Any[]) -function BackedgeIterator(mi::MethodInstance) - isdefined(mi, :backedges) || return empty_backedge_iter - return BackedgeIterator(mi.backedges) -end function iterate(iter::BackedgeIterator, i::Int=1) backedges = iter.backedges