Skip to content

Commit

Permalink
Adjust to julia#53953 (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno authored Apr 9, 2024
1 parent 108391a commit c4c9697
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/interpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ CC.haskey(wvc::WorldView{CthulhuCache}, mi::MethodInstance) = haskey(wvc.cache.c
CC.setindex!(wvc::WorldView{CthulhuCache}, ci::CodeInstance, mi::MethodInstance) = setindex!(wvc.cache.cache, ci, mi)

function CC.add_remark!(interp::CthulhuInterpreter, sv::InferenceState, msg)
key = CC.any(sv.result.overridden_by_const) ? sv.result : sv.linfo
key = (isdefined(CC, :is_constproped) ? CC.is_constproped(sv) : CC.any(sv.result.overridden_by_const)) ? sv.result : sv.linfo
push!(get!(PC2Remarks, interp.remarks, key), sv.currpc=>msg)
end

function CC.merge_effects!(interp::CthulhuInterpreter, sv::InferenceState, effects::Effects)
key = CC.any(sv.result.overridden_by_const) ? sv.result : sv.linfo
key = (isdefined(CC, :is_constproped) ? CC.is_constproped(sv) : CC.any(sv.result.overridden_by_const)) ? sv.result : sv.linfo
pc2effects = get!(interp.effects, key, PC2Effects())
pc2effects[sv.currpc] = CC.merge_effects(get!(pc2effects, sv.currpc, EFFECTS_TOTAL), effects)
@invoke CC.merge_effects!(interp::AbstractInterpreter, sv::InferenceState, effects::Effects)
Expand All @@ -109,7 +109,7 @@ end

function CC.finish(state::InferenceState, interp::CthulhuInterpreter)
res = @invoke CC.finish(state::InferenceState, interp::AbstractInterpreter)
key = CC.any(state.result.overridden_by_const) ? state.result : state.linfo
key = (isdefined(CC, :is_constproped) ? CC.is_constproped(state) : CC.any(state.result.overridden_by_const)) ? state.result : state.linfo
interp.unopt[key] = InferredSource(state)
return res
end
Expand Down Expand Up @@ -224,7 +224,7 @@ end
@static if VERSION v"1.11.0-DEV.1127"
function CC.update_exc_bestguess!(interp::CthulhuInterpreter, @nospecialize(exct),
frame::InferenceState)
key = CC.any(frame.result.overridden_by_const) ? frame.result : frame.linfo
key = (isdefined(CC, :is_constproped) ? CC.is_constproped(frame) : CC.any(frame.result.overridden_by_const)) ? frame.result : frame.linfo
pc2excts = get!(PC2Excts, interp.exception_types, key)
pc2excts[frame.currpc] = CC.tmerge(CC.typeinf_lattice(interp), exct, get(pc2excts, frame.currpc, Union{}))
return @invoke CC.update_exc_bestguess!(interp::AbstractInterpreter, exct::Any,
Expand Down

0 comments on commit c4c9697

Please sign in to comment.