summaryrefslogtreecommitdiffstatshomepage
path: root/tools/mpy-tool.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-02-15 12:18:59 +1100
committerDamien George <damien.p.george@gmail.com>2019-03-05 16:09:58 +1100
commit5a2599d96299ad37cda954f1de345159f9acf11c (patch)
tree13e82197f7494090b98a72f85f5aec3425d7cfa3 /tools/mpy-tool.py
parent6f9e3ff719917616f163d3d671d6abe9472ba6ff (diff)
downloadmicropython-5a2599d96299ad37cda954f1de345159f9acf11c.tar.gz
micropython-5a2599d96299ad37cda954f1de345159f9acf11c.zip
py: Replace POP_BLOCK and POP_EXCEPT opcodes with POP_EXCEPT_JUMP.
POP_BLOCK and POP_EXCEPT are now the same, and are always followed by a JUMP. So this optimisation reduces code size, and RAM usage of bytecode by two bytes for each try-except handler.
Diffstat (limited to 'tools/mpy-tool.py')
-rwxr-xr-xtools/mpy-tool.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py
index 6fbb10a39d..62f2ac4815 100755
--- a/tools/mpy-tool.py
+++ b/tools/mpy-tool.py
@@ -105,7 +105,7 @@ def make_opcode_format():
OC4(O, O, U, U), # 0x38-0x3b
OC4(U, O, B, O), # 0x3c-0x3f
OC4(O, B, B, O), # 0x40-0x43
- OC4(B, B, O, B), # 0x44-0x47
+ OC4(O, U, O, B), # 0x44-0x47
OC4(U, U, U, U), # 0x48-0x4b
OC4(U, U, U, U), # 0x4c-0x4f
OC4(V, V, U, V), # 0x50-0x53