py/emitglue: Include fun_data_len in mp_raw_code_t only when saving.

Reduces the size of mp_raw_code_t in the case when MICROPY_DEBUG_PRINTERS
is enabled.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2024-02-13 10:46:11 +11:00
parent 5a3dd8c791
commit def6ad4742
9 changed files with 27 additions and 33 deletions

View File

@@ -3625,7 +3625,7 @@ void mp_compile_to_raw_code(mp_parse_tree_t *parse_tree, qstr source_file, bool
for (scope_t *s = comp->scope_head; s != NULL; s = s->next) {
mp_raw_code_t *rc = s->raw_code;
if (rc->kind == MP_CODE_BYTECODE) {
mp_bytecode_print(&mp_plat_print, rc, &cm->context->constants);
mp_bytecode_print(&mp_plat_print, rc, s->raw_code_data_len, &cm->context->constants);
}
}
}