File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8483,16 +8483,18 @@ static void
8483
8483
eliminate_empty_basic_blocks (cfg_builder * g );
8484
8484
8485
8485
#ifdef Py_DEBUG
8486
- static void
8487
- assert_no_redundant_jumps (cfg_builder * g ) {
8486
+ static bool
8487
+ no_redundant_jumps (cfg_builder * g ) {
8488
8488
for (basicblock * b = g -> g_entryblock ; b != NULL ; b = b -> b_next ) {
8489
8489
struct instr * last = basicblock_last_instr (b );
8490
8490
if (last != NULL ) {
8491
8491
if (last -> i_opcode == JUMP || last -> i_opcode == JUMP_NO_INTERRUPT ) {
8492
8492
assert (last -> i_target != b -> b_next );
8493
+ return false;
8493
8494
}
8494
8495
}
8495
8496
}
8497
+ return true;
8496
8498
}
8497
8499
#endif
8498
8500
@@ -8642,9 +8644,7 @@ assemble(struct compiler *c, int addNone)
8642
8644
goto error ;
8643
8645
}
8644
8646
8645
- #ifdef Py_DEBUG
8646
- assert_no_redundant_jumps (g );
8647
- #endif
8647
+ assert (no_redundant_jumps (g ));
8648
8648
8649
8649
/* Can't modify the bytecode after computing jump offsets. */
8650
8650
assemble_jump_offsets (g -> g_entryblock );
You can’t perform that action at this time.
0 commit comments