Skip to content

Commit 07a44d9

Browse files
authored
bpo-42057: Fix peephole optimizer (GH-22802)
1 parent c3538b8 commit 07a44d9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix peephole optimizer misoptimize conditional jump + JUMP_IF_NOT_EXC_MATCH
2+
pair.

Python/peephole.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#define UNCONDITIONAL_JUMP(op) (op==JUMP_ABSOLUTE || op==JUMP_FORWARD)
1414
#define CONDITIONAL_JUMP(op) (op==POP_JUMP_IF_FALSE || op==POP_JUMP_IF_TRUE \
15-
|| op==JUMP_IF_FALSE_OR_POP || op==JUMP_IF_TRUE_OR_POP || op==JUMP_IF_NOT_EXC_MATCH)
15+
|| op==JUMP_IF_FALSE_OR_POP || op==JUMP_IF_TRUE_OR_POP)
1616
#define ABSOLUTE_JUMP(op) (op==JUMP_ABSOLUTE \
1717
|| op==POP_JUMP_IF_FALSE || op==POP_JUMP_IF_TRUE \
1818
|| op==JUMP_IF_FALSE_OR_POP || op==JUMP_IF_TRUE_OR_POP || op==JUMP_IF_NOT_EXC_MATCH)

0 commit comments

Comments
 (0)