bpo-45773: Remove invalid peephole optimizations (GH-31066)

This commit is contained in:
Brandt Bucher 2022-02-03 02:14:44 -08:00 committed by GitHub
parent b4bd1e1422
commit e0433c1e70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -0,0 +1 @@
Remove two invalid "peephole" optimizations from the bytecode compiler.

View File

@ -8757,7 +8757,6 @@ optimize_basic_block(struct compiler *c, basicblock *bb, PyObject *consts)
switch (target->i_opcode) { switch (target->i_opcode) {
case JUMP_ABSOLUTE: case JUMP_ABSOLUTE:
case JUMP_FORWARD: case JUMP_FORWARD:
case JUMP_IF_FALSE_OR_POP:
i -= jump_thread(inst, target, POP_JUMP_IF_FALSE); i -= jump_thread(inst, target, POP_JUMP_IF_FALSE);
} }
break; break;
@ -8765,7 +8764,6 @@ optimize_basic_block(struct compiler *c, basicblock *bb, PyObject *consts)
switch (target->i_opcode) { switch (target->i_opcode) {
case JUMP_ABSOLUTE: case JUMP_ABSOLUTE:
case JUMP_FORWARD: case JUMP_FORWARD:
case JUMP_IF_TRUE_OR_POP:
i -= jump_thread(inst, target, POP_JUMP_IF_TRUE); i -= jump_thread(inst, target, POP_JUMP_IF_TRUE);
} }
break; break;