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.
This commit is contained in:
@@ -76,8 +76,7 @@ static const void *const entry_table[256] = {
|
||||
[MP_BC_GET_ITER] = &&entry_MP_BC_GET_ITER,
|
||||
[MP_BC_GET_ITER_STACK] = &&entry_MP_BC_GET_ITER_STACK,
|
||||
[MP_BC_FOR_ITER] = &&entry_MP_BC_FOR_ITER,
|
||||
[MP_BC_POP_BLOCK] = &&entry_MP_BC_POP_BLOCK,
|
||||
[MP_BC_POP_EXCEPT] = &&entry_MP_BC_POP_EXCEPT,
|
||||
[MP_BC_POP_EXCEPT_JUMP] = &&entry_MP_BC_POP_EXCEPT_JUMP,
|
||||
[MP_BC_BUILD_TUPLE] = &&entry_MP_BC_BUILD_TUPLE,
|
||||
[MP_BC_BUILD_LIST] = &&entry_MP_BC_BUILD_LIST,
|
||||
[MP_BC_BUILD_MAP] = &&entry_MP_BC_BUILD_MAP,
|
||||
|
||||
Reference in New Issue
Block a user