diff options
| author | Inada Naoki <songofacandy@gmail.com> | 2020-10-20 11:38:23 +0900 |
|---|---|---|
| committer | Inada Naoki <songofacandy@gmail.com> | 2020-10-20 11:43:48 +0900 |
| commit | 94886ca375c6e172b6872037b6a823e737e812c7 (patch) | |
| tree | fab26cea801cf629bb592682bcfc3986767c14a8 | |
| parent | 7c949020ef2520d7a7cbc978f0b34423e6c2a94c (diff) | |
| download | cpython-git-94886ca375c6e172b6872037b6a823e737e812c7.tar.gz | |
bpo-42057: Fix peephole optimizer
| -rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2020-10-20-11-36-14.bpo-42057.BI-OoV.rst | 2 | ||||
| -rw-r--r-- | Python/peephole.c | 2 |
2 files changed, 3 insertions, 1 deletions
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 index 0000000000..95c3a248f9 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-10-20-11-36-14.bpo-42057.BI-OoV.rst @@ -0,0 +1,2 @@ +Fix peephole optimizer misoptimize conditional jump + JUMP_IF_NOT_EXC_MATCH +pair. diff --git a/Python/peephole.c b/Python/peephole.c index 84de1abc17..6954c87b13 100644 --- a/Python/peephole.c +++ b/Python/peephole.c @@ -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) |
