@@ -82,7 +82,6 @@ const mp_uint_t *mp_showbc_const_table;
8282
8383void mp_bytecode_print (const void * descr , const byte * ip , mp_uint_t len , const mp_uint_t * const_table ) {
8484 mp_showbc_code_start = ip ;
85- mp_showbc_const_table = const_table ;
8685
8786 // get bytecode parameters
8887 mp_uint_t n_state = mp_decode_uint (& ip );
@@ -159,7 +158,7 @@ void mp_bytecode_print(const void *descr, const byte *ip, mp_uint_t len, const m
159158 printf (" bc=" INT_FMT " line=" UINT_FMT "\n" , bc , source_line );
160159 }
161160 }
162- mp_bytecode_print2 (ip , len - 0 );
161+ mp_bytecode_print2 (ip , len - 0 , const_table );
163162}
164163
165164const byte * mp_bytecode_print_str (const byte * ip ) {
@@ -547,8 +546,9 @@ const byte *mp_bytecode_print_str(const byte *ip) {
547546 return ip ;
548547}
549548
550- void mp_bytecode_print2 (const byte * ip , mp_uint_t len ) {
549+ void mp_bytecode_print2 (const byte * ip , size_t len , const mp_uint_t * const_table ) {
551550 mp_showbc_code_start = ip ;
551+ mp_showbc_const_table = const_table ;
552552 while (ip < len + mp_showbc_code_start ) {
553553 printf ("%02u " , (uint )(ip - mp_showbc_code_start ));
554554 ip = mp_bytecode_print_str (ip );
0 commit comments