From: Brandt Bucher Date: Thu, 3 Feb 2022 10:14:44 +0000 (-0800) Subject: bpo-45773: Remove invalid peephole optimizations (GH-31066) X-Git-Tag: v3.11.0a5~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0433c1e70254d4d0357a9e14596929a04bdf769;p=thirdparty%2FPython%2Fcpython.git bpo-45773: Remove invalid peephole optimizations (GH-31066) --- diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-02-01-14-30-56.bpo-45773.Up77LD.rst b/Misc/NEWS.d/next/Core and Builtins/2022-02-01-14-30-56.bpo-45773.Up77LD.rst new file mode 100644 index 000000000000..45da5116fc94 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2022-02-01-14-30-56.bpo-45773.Up77LD.rst @@ -0,0 +1 @@ +Remove two invalid "peephole" optimizations from the bytecode compiler. diff --git a/Python/compile.c b/Python/compile.c index 1d2d567e85e9..cecd6a5c4266 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -8757,7 +8757,6 @@ optimize_basic_block(struct compiler *c, basicblock *bb, PyObject *consts) switch (target->i_opcode) { case JUMP_ABSOLUTE: case JUMP_FORWARD: - case JUMP_IF_FALSE_OR_POP: i -= jump_thread(inst, target, POP_JUMP_IF_FALSE); } break; @@ -8765,7 +8764,6 @@ optimize_basic_block(struct compiler *c, basicblock *bb, PyObject *consts) switch (target->i_opcode) { case JUMP_ABSOLUTE: case JUMP_FORWARD: - case JUMP_IF_TRUE_OR_POP: i -= jump_thread(inst, target, POP_JUMP_IF_TRUE); } break;