Skip to content

Commit a0b64b8

Browse files
committed
IS_END_OF_BASICBLOCK_OPCODE -> IS_TERMINTATOR_OPCODE
1 parent 68abebf commit a0b64b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Python/compile.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@
8585
(opcode) == SETUP_WITH || \
8686
(opcode) == SETUP_CLEANUP)
8787

88-
#define IS_END_OF_BASICBLOCK_OPCODE(opcode) \
88+
/* opcodes that must be last in the basicblock */
89+
#define IS_TERMINTATOR_OPCODE(opcode) \
8990
(IS_JUMP_OPCODE(opcode) || IS_SCOPE_EXIT_OPCODE(opcode))
9091

9192
/* opcodes which are not emitted in codegen stage, only by the assembler */
@@ -1251,7 +1252,7 @@ compiler_use_new_implicit_block_if_needed(struct compiler *c)
12511252
{
12521253
basicblock *b = c->u->u_curblock;
12531254
struct instr *last = basicblock_last_instr(b);
1254-
if (last && IS_END_OF_BASICBLOCK_OPCODE(last->i_opcode)) {
1255+
if (last && IS_TERMINTATOR_OPCODE(last->i_opcode)) {
12551256
basicblock *b = compiler_new_block(c);
12561257
if (b == NULL) {
12571258
return -1;

0 commit comments

Comments
 (0)