8000 move trim_unused_consts to assembly stage · python/cpython@9827030 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9827030

Browse files
committed
move trim_unused_consts to assembly stage
1 parent 27102b2 commit 9827030

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/compile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8644,9 +8644,6 @@ assemble(struct compiler *c, int addNone)
86448644
if (optimize_cfg(g, consts, c->c_const_cache)) {
86458645
goto error;
86468646
}
8647-
if (trim_unused_consts(g->g_entryblock, consts)) {
8648-
goto error;
8649-
}
86508647
if (duplicate_exits_without_lineno(g) < 0) {
86518648
goto error;
86528649
}
@@ -8682,6 +8679,9 @@ assemble(struct compiler *c, int addNone)
86828679
/* Can't modify the bytecode after computing jump offsets. */
86838680
assemble_jump_offsets(g->g_entryblock);
86848681

8682+
if (trim_unused_consts(g->g_entryblock, consts)) {
8683+
goto error;
8684+
}
86858685

86868686
/* Create assembler */
86878687
if (!assemble_init(&a, c->u->u_firstlineno))

0 commit comments

Comments
 (0)
0