Skip to content

Commit ff6948b

Browse files
bpo-45773: Remove invalid peephole optimizations (GH-31066)
(cherry picked from commit e0433c1) Co-authored-by: Brandt Bucher <[email protected]>
1 parent a77de58 commit ff6948b

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove two invalid "peephole" optimizations from the bytecode compiler.

Python/compile.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7449,15 +7449,13 @@ optimize_basic_block(struct compiler *c, basicblock *bb, PyObject *consts)
74497449
switch (target->i_opcode) {
74507450
case JUMP_ABSOLUTE:
74517451
case JUMP_FORWARD:
7452-
case JUMP_IF_FALSE_OR_POP:
74537452
i -= jump_thread(inst, target, POP_JUMP_IF_FALSE);
74547453
}
74557454
break;
74567455
case POP_JUMP_IF_TRUE:
74577456
switch (target->i_opcode) {
74587457
case JUMP_ABSOLUTE:
74597458
case JUMP_FORWARD:
7460-
case JUMP_IF_TRUE_OR_POP:
74617459
i -= jump_thread(inst, target, POP_JUMP_IF_TRUE);
74627460
}
74637461
break;

0 commit comments

Comments
 (0)