summaryrefslogtreecommitdiffstatshomepage
path: root/py/showbc.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-09 15:26:46 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-09 15:26:46 +0100
commit2bf7c092225645d8c5b15e536afdce39e3593e42 (patch)
treee257514a3008411367ea5e62eaea4b101ccac257 /py/showbc.c
parent11d8cd54c992eee55f27d3779738626bdc095c03 (diff)
downloadmicropython-2bf7c092225645d8c5b15e536afdce39e3593e42.tar.gz
micropython-2bf7c092225645d8c5b15e536afdce39e3593e42.zip
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.
Diffstat (limited to 'py/showbc.c')
-rw-r--r--py/showbc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/py/showbc.c b/py/showbc.c
index c56620435d..c1e420f433 100644
--- a/py/showbc.c
+++ b/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));