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

@@ -930,10 +930,8 @@ class RawCode(object):
print(" .children = (void *)%s," % prelude_ptr)
else:
print(" .children = NULL,")
print(" #if MICROPY_PERSISTENT_CODE_SAVE || MICROPY_DEBUG_PRINTERS")
print(" .fun_data_len = %u," % len(self.fun_data))
print(" #endif")
print(" #if MICROPY_PERSISTENT_CODE_SAVE")
print(" .fun_data_len = %u," % len(self.fun_data))
print(" .n_children = %u," % len(self.children))
print(" #if MICROPY_EMIT_MACHINE_CODE")
print(" .prelude_offset = %u," % self.prelude_offset)