Skip to content

Commit

Permalink
pythongh-107901: jump leaving an exception handler doesn't need an ev…
Browse files Browse the repository at this point in the history
…al break check (python#113943)
  • Loading branch information
iritkatriel authored and kulikjak committed Jan 22, 2024
1 parent 4a0b2c2 commit 7e56f4e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Lib/test/test_dis.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,11 +578,11 @@ async def _asyncwith(c):
%4d L12: CLEANUP_THROW
-- L13: JUMP_BACKWARD 26 (to L5)
-- L13: JUMP_BACKWARD_NO_INTERRUPT 25 (to L5)
%4d L14: CLEANUP_THROW
-- L15: JUMP_BACKWARD 11 (to L11)
-- L15: JUMP_BACKWARD_NO_INTERRUPT 9 (to L11)
%4d L16: PUSH_EXC_INFO
WITH_EXCEPT_START
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A jump leaving an exception handler back to normal code no longer checks the eval breaker.
2 changes: 1 addition & 1 deletion Python/flowgraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -2164,7 +2164,7 @@ push_cold_blocks_to_end(cfg_builder *g) {
if (!IS_LABEL(b->b_next->b_label)) {
b->b_next->b_label.id = next_lbl++;
}
basicblock_addop(explicit_jump, JUMP, b->b_next->b_label.id, NO_LOCATION);
basicblock_addop(explicit_jump, JUMP_NO_INTERRUPT, b->b_next->b_label.id, NO_LOCATION);
explicit_jump->b_cold = 1;
explicit_jump->b_next = b->b_next;
b->b_next = explicit_jump;
Expand Down

0 comments on commit 7e56f4e

Please sign in to comment.