summaryrefslogtreecommitdiffstats
path: root/Python/codegen.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2025-01-06 22:01:07 (GMT)
committerGitHub <noreply@github.com>2025-01-06 22:01:07 (GMT)
commit2434fd2d50b8b770585ad5949a664e4bbab4bde1 (patch)
tree8685e8f13c843ca527020363bc372259fa78d7f3 /Python/codegen.c
parentb6c919b674549d519efbbc378588ca6d3efc7242 (diff)
downloadcpython-2434fd2d50b8b770585ad5949a664e4bbab4bde1.zip
cpython-2434fd2d50b8b770585ad5949a664e4bbab4bde1.tar.gz
cpython-2434fd2d50b8b770585ad5949a664e4bbab4bde1.tar.bz2
GH-128533: Add `NOT_TAKEN` instruction after bytecode optimization. (GH-128554)
Diffstat (limited to 'Python/codegen.c')
-rw-r--r--Python/codegen.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/Python/codegen.c b/Python/codegen.c
index 14f9f5a..61707ba 100644
--- a/Python/codegen.c
+++ b/Python/codegen.c
@@ -406,13 +406,7 @@ codegen_addop_j(instr_sequence *seq, location loc,
assert(IS_JUMP_TARGET_LABEL(target));
assert(OPCODE_HAS_JUMP(opcode) || IS_BLOCK_PUSH_OPCODE(opcode));
assert(!IS_ASSEMBLER_OPCODE(opcode));
- if (_PyInstructionSequence_Addop(seq, opcode, target.id, loc) != SUCCESS) {
- return ERROR;
- }
- if (IS_CONDITIONAL_JUMP_OPCODE(opcode)) {
- return _PyInstructionSequence_Addop(seq, NOT_TAKEN, 0, NO_LOCATION);
- }
- return SUCCESS;
+ return _PyInstructionSequence_Addop(seq, opcode, target.id, loc);
}
#define ADDOP_JUMP(C, LOC, OP, O) \