Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
move comment
  • Loading branch information
iritkatriel committed Apr 27, 2023
commit f51084ee879101ef67370493122ad49dbf7e5c3b
5 changes: 3 additions & 2 deletions Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -6997,12 +6997,13 @@ optimize_and_assemble_code_unit(struct compiler_unit *u, PyObject *const_cache,
if (_PyCfg_ResolveJumps(&g) < 0) {
goto error;
}

/* Can't modify the bytecode after computing jump offsets. */

if (cfg_to_instr_sequence(&g, &optimized_instrs) < 0) {
goto error;
}

/* Can't modify the bytecode after computing jump offsets. */

co = _PyAssemble_MakeCodeObject(&u->u_metadata, const_cache, consts,
maxdepth, &optimized_instrs, nlocalsplus,
code_flags, filename);
Expand Down