summaryrefslogtreecommitdiffstatshomepage
path: root/py/showbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/showbc.c')
-rw-r--r--py/showbc.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/py/showbc.c b/py/showbc.c
index dd5959f4a9..684d9af0c0 100644
--- a/py/showbc.c
+++ b/py/showbc.c
@@ -32,6 +32,9 @@
#if MICROPY_DEBUG_PRINTERS
+// redirect all printfs in this file to the platform print stream
+#define printf(...) mp_printf(&mp_plat_print, __VA_ARGS__)
+
#define DECODE_UINT { \
unum = 0; \
do { \
@@ -96,6 +99,7 @@ void mp_bytecode_print(const void *descr, const byte *ip, mp_uint_t len, const m
#if MICROPY_PERSISTENT_CODE
qstr block_name = code_info[0] | (code_info[1] << 8);
qstr source_file = code_info[2] | (code_info[3] << 8);
+ code_info += 4;
#else
qstr block_name = mp_decode_uint(&code_info);
qstr source_file = mp_decode_uint(&code_info);
@@ -409,11 +413,6 @@ const byte *mp_bytecode_print_str(const byte *ip) {
printf("BUILD_LIST " UINT_FMT, unum);
break;
- case MP_BC_LIST_APPEND:
- DECODE_UINT;
- printf("LIST_APPEND " UINT_FMT, unum);
- break;
-
case MP_BC_BUILD_MAP:
DECODE_UINT;
printf("BUILD_MAP " UINT_FMT, unum);
@@ -423,21 +422,11 @@ const byte *mp_bytecode_print_str(const byte *ip) {
printf("STORE_MAP");
break;
- case MP_BC_MAP_ADD:
- DECODE_UINT;
- printf("MAP_ADD " UINT_FMT, unum);
- break;
-
case MP_BC_BUILD_SET:
DECODE_UINT;
printf("BUILD_SET " UINT_FMT, unum);
break;
- case MP_BC_SET_ADD:
- DECODE_UINT;
- printf("SET_ADD " UINT_FMT, unum);
- break;
-
#if MICROPY_PY_BUILTINS_SLICE
case MP_BC_BUILD_SLICE:
DECODE_UINT;
@@ -445,6 +434,11 @@ const byte *mp_bytecode_print_str(const byte *ip) {
break;
#endif
+ case MP_BC_STORE_COMP:
+ DECODE_UINT;
+ printf("STORE_COMP " UINT_FMT, unum);
+ break;
+
case MP_BC_UNPACK_SEQUENCE:
DECODE_UINT;
printf("UNPACK_SEQUENCE " UINT_FMT, unum);