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

Skip to content

Commit dd2b3f3

Browse files
committed
move mark_except_handler to before cfg optimizations
1 parent a5bef75 commit dd2b3f3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Python/compile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8632,6 +8632,9 @@ assemble(struct compiler *c, int addNone)
86328632
if (calculate_jump_targets(g->g_entryblock)) {
86338633
goto error;
86348634
}
8635+
if (mark_except_handlers(g->g_entryblock) < 0) {
8636+
goto error;
8637+
}
86358638
if (optimize_cfg(g, consts, c->c_const_cache)) {
86368639
goto error;
86378640
}
@@ -9521,9 +9524,6 @@ optimize_cfg(cfg_builder *g, PyObject *consts, PyObject *const_cache)
95219524
return -1;
95229525
}
95239526
}
9524-
if (mark_except_handlers(g->g_entryblock) < 0) {
9525-
return -1;
9526-
}
95279527
if (mark_reachable(g->g_entryblock)) {
95289528
return -1;
95299529
}

0 commit comments

Comments
 (0)