From 2bf7c092225645d8c5b15e536afdce39e3593e42 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 9 Apr 2014 15:26:46 +0100 Subject: 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. --- py/showbc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'py/showbc.c') diff --git a/py/showbc.c b/py/showbc.c index c56620435..c1e420f43 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)); -- cgit v1.2.3