Skip to content

Commit

Permalink
fixup! inference: propagate variable changes to all exception frames
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Sep 2, 2021
1 parent c759eee commit 695f9f8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions base/compiler/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1919,10 +1919,11 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState)
ssavaluetypes[pc] = t
end
end
cur_hand = frame.handler_at[pc]
if isa(changes, StateUpdate)
while cur_hand != 0
let l = frame.handler_at[cur_hand + 1]
let cur_hand = frame.handler_at[pc], l, enter
while cur_hand != 0
enter = frame.src.code[cur_hand]
l = (enter::Expr).args[1]::Int
# propagate new type info to exception handler
# the handling for Expr(:enter) propagates all changes from before the try/catch
# so this only needs to propagate any changes
Expand All @@ -1932,8 +1933,8 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState)
end
push!(W, l)
end
cur_hand = frame.handler_at[cur_hand]
end
cur_hand = frame.handler_at[cur_hand]
end
end
end
Expand Down

0 comments on commit 695f9f8

Please sign in to comment.