Skip to content

Commit b4dcbb7

Browse files
committed
Add back printing out code info. Whoops!
1 parent cb01261 commit b4dcbb7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/mpy-tool.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,12 @@ def freeze(self, parent_name):
289289
print(' ', self.simple_name.qstr_id, '& 0xff,', self.simple_name.qstr_id, '>> 8,')
290290
print(" // source file")
291291
print(' ', self.source_file.qstr_id, '& 0xff,', self.source_file.qstr_id, '>> 8,')
292+
print(" // code info")
292293
print(' ', end='')
293294
for i in range(self.ip2 + 4, self.ip):
294-
opcode = self.bytecode[i]
295+
print(' 0x%02x,' % self.bytecode[i], end='')
295296
print()
297+
print(" // bytecode")
296298
ip = self.ip
297299
while ip < len(self.bytecode):
298300
f, sz = mp_opcode_format(self.bytecode, ip)

0 commit comments

Comments
 (0)