summaryrefslogtreecommitdiff
path: root/tools/mpy-tool.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-02-19 14:15:39 +1100
committerDamien George <damien.p.george@gmail.com>2019-03-08 15:53:04 +1100
commit636ed0ff8d4d3c43f7d9fb2d8852073f99c1e6cf (patch)
tree39eb6fb0942a247f94acd3fe2ada6bfee5aea06c /tools/mpy-tool.py
parent3986820912acee0909643636f52c2c672b6427d0 (diff)
py/emitglue: Remove union in mp_raw_code_t to combine bytecode & native.
Diffstat (limited to 'tools/mpy-tool.py')
-rwxr-xr-xtools/mpy-tool.py18
1 files changed, 8 insertions, 10 deletions
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: