mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
py: Properly implement deletion of locals and derefs, and detect errors.
Needed to reinstate 2 delete opcodes, to specifically check that a local is not deleted twice.
This commit is contained in:
15
py/showbc.c
15
py/showbc.c
@@ -123,6 +123,11 @@ void mp_byte_code_print(const byte *ip, int len) {
|
||||
printf("LOAD_FAST_N " UINT_FMT, unum);
|
||||
break;
|
||||
|
||||
case MP_BC_LOAD_FAST_CHECKED:
|
||||
DECODE_UINT;
|
||||
printf("LOAD_FAST_CHECKED " UINT_FMT, unum);
|
||||
break;
|
||||
|
||||
case MP_BC_LOAD_DEREF:
|
||||
DECODE_UINT;
|
||||
printf("LOAD_DEREF " UINT_FMT, unum);
|
||||
@@ -193,6 +198,16 @@ void mp_byte_code_print(const byte *ip, int len) {
|
||||
printf("STORE_SUBSCR");
|
||||
break;
|
||||
|
||||
case MP_BC_DELETE_FAST:
|
||||
DECODE_UINT;
|
||||
printf("DELETE_FAST " UINT_FMT, unum);
|
||||
break;
|
||||
|
||||
case MP_BC_DELETE_DEREF:
|
||||
DECODE_UINT;
|
||||
printf("DELETE_DEREF " UINT_FMT, unum);
|
||||
break;
|
||||
|
||||
case MP_BC_DELETE_NAME:
|
||||
DECODE_QSTR;
|
||||
printf("DELETE_NAME %s", qstr_str(qstr));
|
||||
|
||||
Reference in New Issue
Block a user