Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk authored May 27, 2021
1 parent 6357c9a commit 143aa2d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ function CC.add_call_backedges!(interp::JETInterpreter,
end
end

# now https://github.com/JuliaLang/julia/pull/40561 is merged, remove me once v1.7 is tagged
function CC.abstract_call_method_with_const_args(interp::JETInterpreter, @nospecialize(rettype),
@nospecialize(f), argtypes::Vector{Any}, match::MethodMatch,
sv::InferenceState, edgecycle::Bool,
Expand All @@ -151,6 +152,23 @@ function CC.abstract_call_method_with_const_args(interp::JETInterpreter, @nospec
return result, inf_result
end

function CC.abstract_call_method_with_const_args(interp::JETInterpreter, @nospecialize(rettype),
@nospecialize(f), argtypes::Vector{Any}, match::MethodMatch,
sv::InferenceState, edgecycle::Bool, edgelimited::Bool,
va_override::Bool)
result, inf_result = @invoke abstract_call_method_with_const_args(interp::AbstractInterpreter, @nospecialize(rettype),
@nospecialize(f), argtypes::Vector{Any}, match::MethodMatch,
sv::InferenceState, edgecycle::Bool, edgelimited::Bool,
va_override::Bool)

if isa(inf_result, InferenceResult)
# successful constant prop', we also need to update reports
update_reports!(interp, sv)
end

return result, inf_result
end

@doc """
const_prop_entry_heuristic(interp::JETInterpreter, @nospecialize(rettype), sv::InferenceState, edgecycle::Bool)
Expand Down

0 comments on commit 143aa2d

Please sign in to comment.