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

@@ -324,11 +324,9 @@ STATIC mp_raw_code_t *load_raw_code(mp_reader_t *reader, mp_module_context_t *co
MP_BC_PRELUDE_SIG_DECODE(ip);
// Assign bytecode to raw code object
mp_emit_glue_assign_bytecode(rc, fun_data,
#if MICROPY_PERSISTENT_CODE_SAVE || MICROPY_DEBUG_PRINTERS
fun_data_len,
#endif
children,
#if MICROPY_PERSISTENT_CODE_SAVE
fun_data_len,
n_children,
#endif
scope_flags);