]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42057: Fix peephole optimizer (GH-22802)
authorInada Naoki <songofacandy@gmail.com>
Thu, 22 Oct 2020 02:06:07 +0000 (11:06 +0900)
committerGitHub <noreply@github.com>
Thu, 22 Oct 2020 02:06:07 +0000 (11:06 +0900)
Misc/NEWS.d/next/Core and Builtins/2020-10-20-11-36-14.bpo-42057.BI-OoV.rst [new file with mode: 0644]
Python/peephole.c

diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-10-20-11-36-14.bpo-42057.BI-OoV.rst b/Misc/NEWS.d/next/Core and Builtins/2020-10-20-11-36-14.bpo-42057.BI-OoV.rst
new file mode 100644 (file)
index 0000000..95c3a24
--- /dev/null
@@ -0,0 +1,2 @@
+Fix peephole optimizer misoptimize conditional jump + JUMP_IF_NOT_EXC_MATCH
+pair.
index 84de1abc175476dc1bd525ff8c6180d40c0fe291..6954c87b13bfbf5f35f5d5682839e94e1fea80ef 100644 (file)
@@ -12,7 +12,7 @@
 
 #define UNCONDITIONAL_JUMP(op)  (op==JUMP_ABSOLUTE || op==JUMP_FORWARD)
 #define CONDITIONAL_JUMP(op) (op==POP_JUMP_IF_FALSE || op==POP_JUMP_IF_TRUE \
-    || op==JUMP_IF_FALSE_OR_POP || op==JUMP_IF_TRUE_OR_POP || op==JUMP_IF_NOT_EXC_MATCH)
+    || op==JUMP_IF_FALSE_OR_POP || op==JUMP_IF_TRUE_OR_POP)
 #define ABSOLUTE_JUMP(op) (op==JUMP_ABSOLUTE \
     || op==POP_JUMP_IF_FALSE || op==POP_JUMP_IF_TRUE \
     || op==JUMP_IF_FALSE_OR_POP || op==JUMP_IF_TRUE_OR_POP || op==JUMP_IF_NOT_EXC_MATCH)