From 636ed0ff8d4d3c43f7d9fb2d8852073f99c1e6cf Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 19 Feb 2019 14:15:39 +1100 Subject: py/emitglue: Remove union in mp_raw_code_t to combine bytecode & native. --- tools/mpy-tool.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'tools') diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py index 8a8237403..37adaf355 100755 --- a/tools/mpy-tool.py +++ b/tools/mpy-tool.py @@ -391,18 +391,16 @@ class RawCode: print(' .kind = MP_CODE_BYTECODE,') print(' .scope_flags = 0x%02x,' % self.prelude[2]) print(' .n_pos_args = %u,' % self.prelude[3]) - print(' .data.u_byte = {') - print(' .bytecode = bytecode_data_%s,' % self.escaped_name) + print(' .fun_data = bytecode_data_%s,' % self.escaped_name) if const_table_len: - print(' .const_table = (mp_uint_t*)const_table_data_%s,' % self.escaped_name) + print(' .const_table = (mp_uint_t*)const_table_data_%s,' % self.escaped_name) else: - print(' .const_table = NULL,') - print(' #if MICROPY_PERSISTENT_CODE_SAVE') - print(' .bc_len = %u,' % len(self.bytecode)) - print(' .n_obj = %u,' % len(self.objs)) - print(' .n_raw_code = %u,' % len(self.raw_codes)) - print(' #endif') - print(' },') + print(' .const_table = NULL,') + print(' #if MICROPY_PERSISTENT_CODE_SAVE') + print(' .fun_data_len = %u,' % len(self.bytecode)) + print(' .n_obj = %u,' % len(self.objs)) + print(' .n_raw_code = %u,' % len(self.raw_codes)) + print(' #endif') print('};') class BytecodeBuffer: -- cgit v1.2.3