We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68abebf commit a0b64b8Copy full SHA for a0b64b8
Python/compile.c
@@ -85,7 +85,8 @@
85
(opcode) == SETUP_WITH || \
86
(opcode) == SETUP_CLEANUP)
87
88
-#define IS_END_OF_BASICBLOCK_OPCODE(opcode) \
+/* opcodes that must be last in the basicblock */
89
+#define IS_TERMINTATOR_OPCODE(opcode) \
90
(IS_JUMP_OPCODE(opcode) || IS_SCOPE_EXIT_OPCODE(opcode))
91
92
/* 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)
1251
1252
{
1253
basicblock *b = c->u->u_curblock;
1254
struct instr *last = basicblock_last_instr(b);
- if (last && IS_END_OF_BASICBLOCK_OPCODE(last->i_opcode)) {
1255
+ if (last && IS_TERMINTATOR_OPCODE(last->i_opcode)) {
1256
basicblock *b = compiler_new_block(c);
1257
if (b == NULL) {
1258
return -1;
0 commit comments