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, 2 insertions, 8 deletions
diff --git a/py/showbc.c b/py/showbc.c
index 538eddc40f..62c6168b78 100644
--- a/py/showbc.c
+++ b/py/showbc.c
@@ -54,7 +54,7 @@
const byte *mp_showbc_code_start;
-void mp_bytecode_print(const void *descr, const byte *ip, mp_uint_t len) {
+void mp_bytecode_print(const void *descr, const byte *ip, mp_uint_t len, const mp_uint_t *const_table) {
mp_showbc_code_start = ip;
// get bytecode parameters
@@ -65,12 +65,6 @@ void mp_bytecode_print(const void *descr, const byte *ip, mp_uint_t len) {
mp_uint_t n_kwonly_args = *ip++;
/*mp_uint_t n_def_pos_args =*/ ip++;
- ip = MP_ALIGN(ip, sizeof(mp_uint_t));
-
- // get and skip arg names
- const mp_obj_t *arg_names = (const mp_obj_t*)ip;
- ip += (n_pos_args + n_kwonly_args) * sizeof(mp_uint_t);
-
const byte *code_info = ip;
mp_uint_t code_info_size = mp_decode_uint(&code_info);
ip += code_info_size;
@@ -93,7 +87,7 @@ void mp_bytecode_print(const void *descr, const byte *ip, mp_uint_t len) {
// bytecode prelude: arg names (as qstr objects)
printf("arg names:");
for (mp_uint_t i = 0; i < n_pos_args + n_kwonly_args; i++) {
- printf(" %s", qstr_str(MP_OBJ_QSTR_VALUE(arg_names[i])));
+ printf(" %s", qstr_str(MP_OBJ_QSTR_VALUE(const_table[i])));
}
printf("\n");