Skip to content

Commit

Permalink
don't renumber effects/remarks after inference
Browse files Browse the repository at this point in the history
After JuliaLang/julia#48022 the renumbering of `interp.remarks` and
`interp.effects` are unnecessary. This may lead to printing them on
wrong statements.
  • Loading branch information
aviatesk committed Mar 2, 2023
1 parent ed51dac commit 52244a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/interpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ function CC.merge_effects!(interp::CthulhuInterpreter, sv::InferenceState, effec
end
end

@static if VERSION v"1.10.0-DEV.221"
function CC.type_annotate!(interp::CthulhuInterpreter, sv::InferenceState, run_optimizer::Bool)
changemap = @invoke CC.type_annotate!(interp::AbstractInterpreter, sv::InferenceState, run_optimizer::Bool)
changemap === nothing && return nothing
Expand Down Expand Up @@ -132,6 +133,7 @@ function CC.type_annotate!(interp::CthulhuInterpreter, sv::InferenceState, run_o
end
return changemap
end
end

function CC.finish(state::InferenceState, interp::CthulhuInterpreter)
res = @invoke CC.finish(state::InferenceState, interp::AbstractInterpreter)
Expand Down

0 comments on commit 52244a2

Please sign in to comment.