diff options
author | Damien George <damien.p.george@gmail.com> | 2015-06-18 15:12:17 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-06-18 15:12:17 +0000 |
commit | c8870b7c6969db23815da3c4ecfeaf2200ca2792 (patch) | |
tree | 298404ce6dbd4f39dbab8695ab0f56adfbab2233 /py/showbc.c | |
parent | b6a08208e171bfaee6d5089435fe675e4f71935d (diff) | |
download | micropython-c8870b7c6969db23815da3c4ecfeaf2200ca2792.tar.gz micropython-c8870b7c6969db23815da3c4ecfeaf2200ca2792.zip |
py: Make showbc decode UNPACK_EX, and use correct range for unop/binop.
Diffstat (limited to 'py/showbc.c')
-rw-r--r-- | py/showbc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/py/showbc.c b/py/showbc.c index 30b51de625..e08140e6b6 100644 --- a/py/showbc.c +++ b/py/showbc.c @@ -426,6 +426,11 @@ const byte *mp_bytecode_print_str(const byte *ip) { printf("UNPACK_SEQUENCE " UINT_FMT, unum); break; + case MP_BC_UNPACK_EX: + DECODE_UINT; + printf("UNPACK_EX " UINT_FMT, unum); + break; + case MP_BC_MAKE_FUNCTION: DECODE_PTR; printf("MAKE_FUNCTION %p", (void*)unum); @@ -508,9 +513,9 @@ const byte *mp_bytecode_print_str(const byte *ip) { printf("LOAD_FAST " UINT_FMT, (mp_uint_t)ip[-1] - MP_BC_LOAD_FAST_MULTI); } else if (ip[-1] < MP_BC_STORE_FAST_MULTI + 16) { printf("STORE_FAST " UINT_FMT, (mp_uint_t)ip[-1] - MP_BC_STORE_FAST_MULTI); - } else if (ip[-1] < MP_BC_UNARY_OP_MULTI + 5) { + } else if (ip[-1] < MP_BC_UNARY_OP_MULTI + 6) { printf("UNARY_OP " UINT_FMT, (mp_uint_t)ip[-1] - MP_BC_UNARY_OP_MULTI); - } else if (ip[-1] < MP_BC_BINARY_OP_MULTI + 35) { + } else if (ip[-1] < MP_BC_BINARY_OP_MULTI + 36) { mp_uint_t op = ip[-1] - MP_BC_BINARY_OP_MULTI; printf("BINARY_OP " UINT_FMT " %s", op, qstr_str(mp_binary_op_method_name[op])); } else { |