8000 gh-107901: jump leaving an exception handler doesn't need an eval bre… · python/cpython@0d8fec7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0d8fec7

Browse files
authored
gh-107901: jump leaving an exception handler doesn't need an eval break check (#113943)
1 parent 7ed76fc commit 0d8fec7

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Lib/test/test_dis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,11 +578,11 @@ async def _asyncwith(c):
578578
579579
%4d L12: CLEANUP_THROW
580580
581-
-- L13: JUMP_BACKWARD 26 (to L5)
581+
-- L13: JUMP_BACKWARD_NO_INTERRUPT 25 (to L5)
582582
583583
%4d L14: CLEANUP_THROW
584584
585-
-- L15: JUMP_BACKWARD 11 (to L11)
585+
-- L15: JUMP_BACKWARD_NO_INTERRUPT 9 (to L11)
586586
587587
%4d L16: PUSH_EXC_INFO
588588
WITH_EXCEPT_START
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
A jump leaving an exception handler back to normal code no longer checks the eval breaker.

Python/flowgraph.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2164,7 +2164,7 @@ push_cold_blocks_to_end(cfg_builder *g) {
21642164
if (!IS_LABEL(b->b_next->b_label)) {
21652165
b->b_next->b_label.id = next_lbl++;
21662166
}
2167-
basicblock_addop(explicit_jump, JUMP, b->b_next->b_label.id, NO_LOCATION);
2167+
basicblock_addop(explicit_jump, JUMP_NO_INTERRUPT, b->b_next->b_label.id, NO_LOCATION);
21682168
explicit_jump->b_cold = 1;
21692169
explicit_jump->b_next = b->b_next;
21702170
b->b_next = explicit_jump;

0 commit comments

Comments
 (0)
0