py/emitglue: When assigning bytecode only pass bytecode len if needed.

Most embedded targets will have this bit of the code disabled, saving a
small amount of code space.
This commit is contained in:
Damien George
2018-02-14 18:41:17 +11:00
parent e98ff40604
commit 5604b710c2
4 changed files with 15 additions and 3 deletions

View File

@@ -200,7 +200,11 @@ STATIC mp_raw_code_t *load_raw_code(mp_reader_t *reader) {
// create raw_code and return it
mp_raw_code_t *rc = mp_emit_glue_new_raw_code();
mp_emit_glue_assign_bytecode(rc, bytecode, bc_len, const_table,
mp_emit_glue_assign_bytecode(rc, bytecode,
#if MICROPY_PERSISTENT_CODE_SAVE || MICROPY_DEBUG_PRINTERS
bc_len,
#endif
const_table,
#if MICROPY_PERSISTENT_CODE_SAVE
n_obj, n_raw_code,
#endif