Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d5ab812

Browse files
committed
move label_exception_targets to before cfg optimizations
1 parent dd2b3f3 commit d5ab812

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/compile.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -8635,6 +8635,9 @@ assemble(struct compiler *c, int addNone)
86358635
if (mark_except_handlers(g->g_entryblock) < 0) {
86368636
goto error;
86378637
}
8638+
if (label_exception_targets(g->g_entryblock)) {
8639+
goto error;
8640+
}
86388641
if (optimize_cfg(g, consts, c->c_const_cache)) {
86398642
goto error;
86408643
}
@@ -8653,9 +8656,6 @@ assemble(struct compiler *c, int addNone)
86538656
}
86548657
/* TO DO -- For 3.12, make sure that `maxdepth <= MAX_ALLOWED_STACK_USE` */
86558658

8656-
if (label_exception_targets(g->g_entryblock)) {
8657-
goto error;
8658-
}
86598659
convert_exception_handlers_to_nops(g->g_entryblock);
86608660

86618661
if (push_cold_blocks_to_end(g, code_flags) < 0) {

0 commit comments

Comments
 (0)