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.
Showing
- py/bc.c 1 addition, 1 deletionpy/bc.c
- py/bc0.h 1 addition, 2 deletionspy/bc0.h
- py/compile.c 4 additions, 8 deletionspy/compile.c
- py/emit.h 2 additions, 4 deletionspy/emit.h
- py/emitbc.c 4 additions, 9 deletionspy/emitbc.c
- py/emitnative.c 9 additions, 13 deletionspy/emitnative.c
- py/showbc.c 3 additions, 8 deletionspy/showbc.c
- py/vm.c 5 additions, 9 deletionspy/vm.c
- py/vmentrytable.h 1 addition, 2 deletionspy/vmentrytable.h
- tests/cmdline/cmd_showbc.py.exp 4 additions, 8 deletionstests/cmdline/cmd_showbc.py.exp
- tools/mpy-tool.py 1 addition, 1 deletiontools/mpy-tool.py
Loading
Please register or sign in to comment