diff options
author | Damien George <damien.p.george@gmail.com> | 2019-02-15 12:18:59 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-03-05 16:09:58 +1100 |
commit | 5a2599d96299ad37cda954f1de345159f9acf11c (patch) | |
tree | 13e82197f7494090b98a72f85f5aec3425d7cfa3 /py/bc0.h | |
parent | 6f9e3ff719917616f163d3d671d6abe9472ba6ff (diff) |
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 'py/bc0.h')
-rw-r--r-- | py/bc0.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -77,8 +77,7 @@ #define MP_BC_END_FINALLY (0x41) #define MP_BC_GET_ITER (0x42) #define MP_BC_FOR_ITER (0x43) // rel byte code offset, 16-bit unsigned -#define MP_BC_POP_BLOCK (0x44) -#define MP_BC_POP_EXCEPT (0x45) +#define MP_BC_POP_EXCEPT_JUMP (0x44) // rel byte code offset, 16-bit unsigned #define MP_BC_UNWIND_JUMP (0x46) // rel byte code offset, 16-bit signed, in excess; then a byte #define MP_BC_GET_ITER_STACK (0x47) |