summaryrefslogtreecommitdiffstatshomepage
path: root/py/showbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/showbc.c')
-rw-r--r--py/showbc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/py/showbc.c b/py/showbc.c
index 28fed14c9e..13d257d304 100644
--- a/py/showbc.c
+++ b/py/showbc.c
@@ -57,7 +57,7 @@
ip += sizeof(mp_uint_t); \
} while (0)
-void mp_bytecode_print(const void *descr, const byte *ip, mp_uint_t len) {
+void mp_bytecode_print(const void *descr, mp_uint_t n_total_args, const byte *ip, mp_uint_t len) {
const byte *ip_start = ip;
// get code info size
@@ -80,6 +80,14 @@ void mp_bytecode_print(const void *descr, const byte *ip, mp_uint_t len) {
}
printf("\n");
+ // bytecode prelude: arg names (as qstr objects)
+ printf("arg names:");
+ for (int i = 0; i < n_total_args; i++) {
+ printf(" %s", qstr_str(MP_OBJ_QSTR_VALUE(*(mp_obj_t*)ip)));
+ ip += sizeof(mp_obj_t);
+ }
+ printf("\n");
+
// bytecode prelude: state size and exception stack size; 16 bit uints
{
uint n_state = mp_decode_uint(&ip);