showbc.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. /*
  2. * This file is part of the MicroPython project, http://micropython.org/
  3. *
  4. * The MIT License (MIT)
  5. *
  6. * Copyright (c) 2013, 2014 Damien P. George
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining a copy
  9. * of this software and associated documentation files (the "Software"), to deal
  10. * in the Software without restriction, including without limitation the rights
  11. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  12. * copies of the Software, and to permit persons to whom the Software is
  13. * furnished to do so, subject to the following conditions:
  14. *
  15. * The above copyright notice and this permission notice shall be included in
  16. * all copies or substantial portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  24. * THE SOFTWARE.
  25. */
  26. #include <stdio.h>
  27. #include <assert.h>
  28. #include "py/bc0.h"
  29. #include "py/emitglue.h"
  30. #if MICROPY_DEBUG_PRINTERS
  31. #define DECODE_UINT { \
  32. unum = 0; \
  33. do { \
  34. unum = (unum << 7) + (*ip & 0x7f); \
  35. } while ((*ip++ & 0x80) != 0); \
  36. }
  37. #define DECODE_ULABEL \
  38. do { \
  39. if (ip[0] & 0x80) { \
  40. unum = ((ip[0] & 0x7f) | (ip[1] << 7)); \
  41. ip += 2; \
  42. } else { \
  43. unum = ip[0]; \
  44. ip += 1; \
  45. } \
  46. } while (0)
  47. #define DECODE_SLABEL \
  48. do { \
  49. if (ip[0] & 0x80) { \
  50. unum = ((ip[0] & 0x7f) | (ip[1] << 7)) - 0x4000; \
  51. ip += 2; \
  52. } else { \
  53. unum = ip[0] - 0x40; \
  54. ip += 1; \
  55. } \
  56. } while (0)
  57. #if MICROPY_EMIT_BYTECODE_USES_QSTR_TABLE
  58. #define DECODE_QSTR \
  59. DECODE_UINT; \
  60. qst = qstr_table[unum]
  61. #else
  62. #define DECODE_QSTR \
  63. DECODE_UINT; \
  64. qst = unum;
  65. #endif
  66. #define DECODE_PTR \
  67. DECODE_UINT; \
  68. unum = (mp_uint_t)(uintptr_t)child_table[unum]
  69. #define DECODE_OBJ \
  70. DECODE_UINT; \
  71. unum = (mp_uint_t)obj_table[unum]
  72. void mp_bytecode_print(const mp_print_t *print, const mp_raw_code_t *rc, size_t fun_data_len, const mp_module_constants_t *cm) {
  73. const byte *ip_start = rc->fun_data;
  74. const byte *ip = rc->fun_data;
  75. // Decode prelude
  76. MP_BC_PRELUDE_SIG_DECODE(ip);
  77. MP_BC_PRELUDE_SIZE_DECODE(ip);
  78. const byte *code_info = ip;
  79. qstr block_name = mp_decode_uint(&code_info);
  80. #if MICROPY_EMIT_BYTECODE_USES_QSTR_TABLE
  81. block_name = cm->qstr_table[block_name];
  82. qstr source_file = cm->qstr_table[0];
  83. #else
  84. qstr source_file = cm->source_file;
  85. #endif
  86. mp_printf(print, "File %s, code block '%s' (descriptor: %p, bytecode @%p %u bytes)\n",
  87. qstr_str(source_file), qstr_str(block_name), rc, ip_start, (unsigned)fun_data_len);
  88. // raw bytecode dump
  89. size_t prelude_size = ip - ip_start + n_info + n_cell;
  90. mp_printf(print, "Raw bytecode (code_info_size=%u, bytecode_size=%u):\n",
  91. (unsigned)prelude_size, (unsigned)(fun_data_len - prelude_size));
  92. for (size_t i = 0; i < fun_data_len; i++) {
  93. if (i > 0 && i % 16 == 0) {
  94. mp_printf(print, "\n");
  95. }
  96. mp_printf(print, " %02x", ip_start[i]);
  97. }
  98. mp_printf(print, "\n");
  99. // bytecode prelude: arg names (as qstr objects)
  100. mp_printf(print, "arg names:");
  101. for (mp_uint_t i = 0; i < n_pos_args + n_kwonly_args; i++) {
  102. qstr qst = mp_decode_uint(&code_info);
  103. #if MICROPY_EMIT_BYTECODE_USES_QSTR_TABLE
  104. qst = cm->qstr_table[qst];
  105. #endif
  106. mp_printf(print, " %s", qstr_str(qst));
  107. }
  108. mp_printf(print, "\n");
  109. mp_printf(print, "(N_STATE %u)\n", (unsigned)n_state);
  110. mp_printf(print, "(N_EXC_STACK %u)\n", (unsigned)n_exc_stack);
  111. // skip over code_info
  112. ip += n_info;
  113. const byte *line_info_top = ip;
  114. // bytecode prelude: initialise closed over variables
  115. for (size_t i = 0; i < n_cell; ++i) {
  116. uint local_num = *ip++;
  117. mp_printf(print, "(INIT_CELL %u)\n", local_num);
  118. }
  119. // print out line number info
  120. {
  121. mp_int_t bc = 0;
  122. mp_uint_t source_line = 1;
  123. mp_printf(print, " bc=" INT_FMT " line=" UINT_FMT "\n", bc, source_line);
  124. for (const byte *ci = code_info; ci < line_info_top;) {
  125. if ((ci[0] & 0x80) == 0) {
  126. // 0b0LLBBBBB encoding
  127. bc += ci[0] & 0x1f;
  128. source_line += ci[0] >> 5;
  129. ci += 1;
  130. } else {
  131. // 0b1LLLBBBB 0bLLLLLLLL encoding (l's LSB in second byte)
  132. bc += ci[0] & 0xf;
  133. source_line += ((ci[0] << 4) & 0x700) | ci[1];
  134. ci += 2;
  135. }
  136. mp_printf(print, " bc=" INT_FMT " line=" UINT_FMT "\n", bc, source_line);
  137. }
  138. }
  139. mp_bytecode_print2(print, ip, fun_data_len - prelude_size, rc->children, cm);
  140. }
  141. const byte *mp_bytecode_print_str(const mp_print_t *print, const byte *ip_start, const byte *ip, mp_raw_code_t *const *child_table, const mp_module_constants_t *cm) {
  142. #if MICROPY_EMIT_BYTECODE_USES_QSTR_TABLE
  143. const qstr_short_t *qstr_table = cm->qstr_table;
  144. #endif
  145. const mp_obj_t *obj_table = cm->obj_table;
  146. mp_uint_t unum;
  147. qstr qst;
  148. switch (*ip++) {
  149. case MP_BC_LOAD_CONST_FALSE:
  150. mp_printf(print, "LOAD_CONST_FALSE");
  151. break;
  152. case MP_BC_LOAD_CONST_NONE:
  153. mp_printf(print, "LOAD_CONST_NONE");
  154. break;
  155. case MP_BC_LOAD_CONST_TRUE:
  156. mp_printf(print, "LOAD_CONST_TRUE");
  157. break;
  158. case MP_BC_LOAD_CONST_SMALL_INT: {
  159. mp_int_t num = 0;
  160. if ((ip[0] & 0x40) != 0) {
  161. // Number is negative
  162. num--;
  163. }
  164. do {
  165. num = ((mp_uint_t)num << 7) | (*ip & 0x7f);
  166. } while ((*ip++ & 0x80) != 0);
  167. mp_printf(print, "LOAD_CONST_SMALL_INT " INT_FMT, num);
  168. break;
  169. }
  170. case MP_BC_LOAD_CONST_STRING:
  171. DECODE_QSTR;
  172. mp_printf(print, "LOAD_CONST_STRING '%s'", qstr_str(qst));
  173. break;
  174. case MP_BC_LOAD_CONST_OBJ:
  175. DECODE_OBJ;
  176. mp_printf(print, "LOAD_CONST_OBJ %p=", MP_OBJ_TO_PTR(unum));
  177. mp_obj_print_helper(print, (mp_obj_t)unum, PRINT_REPR);
  178. break;
  179. case MP_BC_LOAD_NULL:
  180. mp_printf(print, "LOAD_NULL");
  181. break;
  182. case MP_BC_LOAD_FAST_N:
  183. DECODE_UINT;
  184. mp_printf(print, "LOAD_FAST_N " UINT_FMT, unum);
  185. break;
  186. case MP_BC_LOAD_DEREF:
  187. DECODE_UINT;
  188. mp_printf(print, "LOAD_DEREF " UINT_FMT, unum);
  189. break;
  190. case MP_BC_LOAD_NAME:
  191. DECODE_QSTR;
  192. mp_printf(print, "LOAD_NAME %s", qstr_str(qst));
  193. break;
  194. case MP_BC_LOAD_GLOBAL:
  195. DECODE_QSTR;
  196. mp_printf(print, "LOAD_GLOBAL %s", qstr_str(qst));
  197. break;
  198. case MP_BC_LOAD_ATTR:
  199. DECODE_QSTR;
  200. mp_printf(print, "LOAD_ATTR %s", qstr_str(qst));
  201. break;
  202. case MP_BC_LOAD_METHOD:
  203. DECODE_QSTR;
  204. mp_printf(print, "LOAD_METHOD %s", qstr_str(qst));
  205. break;
  206. case MP_BC_LOAD_SUPER_METHOD:
  207. DECODE_QSTR;
  208. mp_printf(print, "LOAD_SUPER_METHOD %s", qstr_str(qst));
  209. break;
  210. case MP_BC_LOAD_BUILD_CLASS:
  211. mp_printf(print, "LOAD_BUILD_CLASS");
  212. break;
  213. case MP_BC_LOAD_SUBSCR:
  214. mp_printf(print, "LOAD_SUBSCR");
  215. break;
  216. case MP_BC_STORE_FAST_N:
  217. DECODE_UINT;
  218. mp_printf(print, "STORE_FAST_N " UINT_FMT, unum);
  219. break;
  220. case MP_BC_STORE_DEREF:
  221. DECODE_UINT;
  222. mp_printf(print, "STORE_DEREF " UINT_FMT, unum);
  223. break;
  224. case MP_BC_STORE_NAME:
  225. DECODE_QSTR;
  226. mp_printf(print, "STORE_NAME %s", qstr_str(qst));
  227. break;
  228. case MP_BC_STORE_GLOBAL:
  229. DECODE_QSTR;
  230. mp_printf(print, "STORE_GLOBAL %s", qstr_str(qst));
  231. break;
  232. case MP_BC_STORE_ATTR:
  233. DECODE_QSTR;
  234. mp_printf(print, "STORE_ATTR %s", qstr_str(qst));
  235. break;
  236. case MP_BC_STORE_SUBSCR:
  237. mp_printf(print, "STORE_SUBSCR");
  238. break;
  239. case MP_BC_DELETE_FAST:
  240. DECODE_UINT;
  241. mp_printf(print, "DELETE_FAST " UINT_FMT, unum);
  242. break;
  243. case MP_BC_DELETE_DEREF:
  244. DECODE_UINT;
  245. mp_printf(print, "DELETE_DEREF " UINT_FMT, unum);
  246. break;
  247. case MP_BC_DELETE_NAME:
  248. DECODE_QSTR;
  249. mp_printf(print, "DELETE_NAME %s", qstr_str(qst));
  250. break;
  251. case MP_BC_DELETE_GLOBAL:
  252. DECODE_QSTR;
  253. mp_printf(print, "DELETE_GLOBAL %s", qstr_str(qst));
  254. break;
  255. case MP_BC_DUP_TOP:
  256. mp_printf(print, "DUP_TOP");
  257. break;
  258. case MP_BC_DUP_TOP_TWO:
  259. mp_printf(print, "DUP_TOP_TWO");
  260. break;
  261. case MP_BC_POP_TOP:
  262. mp_printf(print, "POP_TOP");
  263. break;
  264. case MP_BC_ROT_TWO:
  265. mp_printf(print, "ROT_TWO");
  266. break;
  267. case MP_BC_ROT_THREE:
  268. mp_printf(print, "ROT_THREE");
  269. break;
  270. case MP_BC_JUMP:
  271. DECODE_SLABEL;
  272. mp_printf(print, "JUMP " UINT_FMT, (mp_uint_t)(ip + unum - ip_start));
  273. break;
  274. case MP_BC_POP_JUMP_IF_TRUE:
  275. DECODE_SLABEL;
  276. mp_printf(print, "POP_JUMP_IF_TRUE " UINT_FMT, (mp_uint_t)(ip + unum - ip_start));
  277. break;
  278. case MP_BC_POP_JUMP_IF_FALSE:
  279. DECODE_SLABEL;
  280. mp_printf(print, "POP_JUMP_IF_FALSE " UINT_FMT, (mp_uint_t)(ip + unum - ip_start));
  281. break;
  282. case MP_BC_JUMP_IF_TRUE_OR_POP:
  283. DECODE_ULABEL;
  284. mp_printf(print, "JUMP_IF_TRUE_OR_POP " UINT_FMT, (mp_uint_t)(ip + unum - ip_start));
  285. break;
  286. case MP_BC_JUMP_IF_FALSE_OR_POP:
  287. DECODE_ULABEL;
  288. mp_printf(print, "JUMP_IF_FALSE_OR_POP " UINT_FMT, (mp_uint_t)(ip + unum - ip_start));
  289. break;
  290. case MP_BC_SETUP_WITH:
  291. DECODE_ULABEL; // loop-like labels are always forward
  292. mp_printf(print, "SETUP_WITH " UINT_FMT, (mp_uint_t)(ip + unum - ip_start));
  293. break;
  294. case MP_BC_WITH_CLEANUP:
  295. mp_printf(print, "WITH_CLEANUP");
  296. break;
  297. case MP_BC_UNWIND_JUMP:
  298. DECODE_SLABEL;
  299. mp_printf(print, "UNWIND_JUMP " UINT_FMT " %d", (mp_uint_t)(ip + unum - ip_start), *ip);
  300. ip += 1;
  301. break;
  302. case MP_BC_SETUP_EXCEPT:
  303. DECODE_ULABEL; // except labels are always forward
  304. mp_printf(print, "SETUP_EXCEPT " UINT_FMT, (mp_uint_t)(ip + unum - ip_start));
  305. break;
  306. case MP_BC_SETUP_FINALLY:
  307. DECODE_ULABEL; // except labels are always forward
  308. mp_printf(print, "SETUP_FINALLY " UINT_FMT, (mp_uint_t)(ip + unum - ip_start));
  309. break;
  310. case MP_BC_END_FINALLY:
  311. // if TOS is an exception, reraises the exception (3 values on TOS)
  312. // if TOS is an integer, does something else
  313. // if TOS is None, just pops it and continues
  314. // else error
  315. mp_printf(print, "END_FINALLY");
  316. break;
  317. case MP_BC_GET_ITER:
  318. mp_printf(print, "GET_ITER");
  319. break;
  320. case MP_BC_GET_ITER_STACK:
  321. mp_printf(print, "GET_ITER_STACK");
  322. break;
  323. case MP_BC_FOR_ITER:
  324. DECODE_ULABEL; // the jump offset if iteration finishes; for labels are always forward
  325. mp_printf(print, "FOR_ITER " UINT_FMT, (mp_uint_t)(ip + unum - ip_start));
  326. break;
  327. case MP_BC_POP_EXCEPT_JUMP:
  328. DECODE_ULABEL; // these labels are always forward
  329. mp_printf(print, "POP_EXCEPT_JUMP " UINT_FMT, (mp_uint_t)(ip + unum - ip_start));
  330. break;
  331. case MP_BC_BUILD_TUPLE:
  332. DECODE_UINT;
  333. mp_printf(print, "BUILD_TUPLE " UINT_FMT, unum);
  334. break;
  335. case MP_BC_BUILD_LIST:
  336. DECODE_UINT;
  337. mp_printf(print, "BUILD_LIST " UINT_FMT, unum);
  338. break;
  339. case MP_BC_BUILD_MAP:
  340. DECODE_UINT;
  341. mp_printf(print, "BUILD_MAP " UINT_FMT, unum);
  342. break;
  343. case MP_BC_STORE_MAP:
  344. mp_printf(print, "STORE_MAP");
  345. break;
  346. case MP_BC_BUILD_SET:
  347. DECODE_UINT;
  348. mp_printf(print, "BUILD_SET " UINT_FMT, unum);
  349. break;
  350. #if MICROPY_PY_BUILTINS_SLICE
  351. case MP_BC_BUILD_SLICE:
  352. DECODE_UINT;
  353. mp_printf(print, "BUILD_SLICE " UINT_FMT, unum);
  354. break;
  355. #endif
  356. case MP_BC_STORE_COMP:
  357. DECODE_UINT;
  358. mp_printf(print, "STORE_COMP " UINT_FMT, unum);
  359. break;
  360. case MP_BC_UNPACK_SEQUENCE:
  361. DECODE_UINT;
  362. mp_printf(print, "UNPACK_SEQUENCE " UINT_FMT, unum);
  363. break;
  364. case MP_BC_UNPACK_EX:
  365. DECODE_UINT;
  366. mp_printf(print, "UNPACK_EX " UINT_FMT, unum);
  367. break;
  368. case MP_BC_MAKE_FUNCTION:
  369. DECODE_PTR;
  370. mp_printf(print, "MAKE_FUNCTION %p", (void *)(uintptr_t)unum);
  371. break;
  372. case MP_BC_MAKE_FUNCTION_DEFARGS:
  373. DECODE_PTR;
  374. mp_printf(print, "MAKE_FUNCTION_DEFARGS %p", (void *)(uintptr_t)unum);
  375. break;
  376. case MP_BC_MAKE_CLOSURE: {
  377. DECODE_PTR;
  378. mp_uint_t n_closed_over = *ip++;
  379. mp_printf(print, "MAKE_CLOSURE %p " UINT_FMT, (void *)(uintptr_t)unum, n_closed_over);
  380. break;
  381. }
  382. case MP_BC_MAKE_CLOSURE_DEFARGS: {
  383. DECODE_PTR;
  384. mp_uint_t n_closed_over = *ip++;
  385. mp_printf(print, "MAKE_CLOSURE_DEFARGS %p " UINT_FMT, (void *)(uintptr_t)unum, n_closed_over);
  386. break;
  387. }
  388. case MP_BC_CALL_FUNCTION:
  389. DECODE_UINT;
  390. mp_printf(print, "CALL_FUNCTION n=" UINT_FMT " nkw=" UINT_FMT, unum & 0xff, (unum >> 8) & 0xff);
  391. break;
  392. case MP_BC_CALL_FUNCTION_VAR_KW:
  393. DECODE_UINT;
  394. mp_printf(print, "CALL_FUNCTION_VAR_KW n=" UINT_FMT " nkw=" UINT_FMT, unum & 0xff, (unum >> 8) & 0xff);
  395. break;
  396. case MP_BC_CALL_METHOD:
  397. DECODE_UINT;
  398. mp_printf(print, "CALL_METHOD n=" UINT_FMT " nkw=" UINT_FMT, unum & 0xff, (unum >> 8) & 0xff);
  399. break;
  400. case MP_BC_CALL_METHOD_VAR_KW:
  401. DECODE_UINT;
  402. mp_printf(print, "CALL_METHOD_VAR_KW n=" UINT_FMT " nkw=" UINT_FMT, unum & 0xff, (unum >> 8) & 0xff);
  403. break;
  404. case MP_BC_RETURN_VALUE:
  405. mp_printf(print, "RETURN_VALUE");
  406. break;
  407. case MP_BC_RAISE_LAST:
  408. mp_printf(print, "RAISE_LAST");
  409. break;
  410. case MP_BC_RAISE_OBJ:
  411. mp_printf(print, "RAISE_OBJ");
  412. break;
  413. case MP_BC_RAISE_FROM:
  414. mp_printf(print, "RAISE_FROM");
  415. break;
  416. case MP_BC_YIELD_VALUE:
  417. mp_printf(print, "YIELD_VALUE");
  418. break;
  419. case MP_BC_YIELD_FROM:
  420. mp_printf(print, "YIELD_FROM");
  421. break;
  422. case MP_BC_IMPORT_NAME:
  423. DECODE_QSTR;
  424. mp_printf(print, "IMPORT_NAME '%s'", qstr_str(qst));
  425. break;
  426. case MP_BC_IMPORT_FROM:
  427. DECODE_QSTR;
  428. mp_printf(print, "IMPORT_FROM '%s'", qstr_str(qst));
  429. break;
  430. case MP_BC_IMPORT_STAR:
  431. mp_printf(print, "IMPORT_STAR");
  432. break;
  433. default:
  434. if (ip[-1] < MP_BC_LOAD_CONST_SMALL_INT_MULTI + 64) {
  435. mp_printf(print, "LOAD_CONST_SMALL_INT " INT_FMT, (mp_int_t)ip[-1] - MP_BC_LOAD_CONST_SMALL_INT_MULTI - 16);
  436. } else if (ip[-1] < MP_BC_LOAD_FAST_MULTI + 16) {
  437. mp_printf(print, "LOAD_FAST " UINT_FMT, (mp_uint_t)ip[-1] - MP_BC_LOAD_FAST_MULTI);
  438. } else if (ip[-1] < MP_BC_STORE_FAST_MULTI + 16) {
  439. mp_printf(print, "STORE_FAST " UINT_FMT, (mp_uint_t)ip[-1] - MP_BC_STORE_FAST_MULTI);
  440. } else if (ip[-1] < MP_BC_UNARY_OP_MULTI + MP_UNARY_OP_NUM_BYTECODE) {
  441. mp_uint_t op = ip[-1] - MP_BC_UNARY_OP_MULTI;
  442. mp_printf(print, "UNARY_OP " UINT_FMT " %s", op, qstr_str(mp_unary_op_method_name[op]));
  443. } else if (ip[-1] < MP_BC_BINARY_OP_MULTI + MP_BINARY_OP_NUM_BYTECODE) {
  444. mp_uint_t op = ip[-1] - MP_BC_BINARY_OP_MULTI;
  445. mp_printf(print, "BINARY_OP " UINT_FMT " %s", op, qstr_str(mp_binary_op_method_name[op]));
  446. } else {
  447. mp_printf(print, "code %p, byte code 0x%02x not implemented\n", ip - 1, ip[-1]);
  448. assert(0);
  449. return ip;
  450. }
  451. break;
  452. }
  453. return ip;
  454. }
  455. void mp_bytecode_print2(const mp_print_t *print, const byte *ip, size_t len, mp_raw_code_t *const *child_table, const mp_module_constants_t *cm) {
  456. const byte *ip_start = ip;
  457. while (ip < ip_start + len) {
  458. mp_printf(print, "%02u ", (uint)(ip - ip_start));
  459. ip = mp_bytecode_print_str(print, ip_start, ip, child_table, cm);
  460. mp_printf(print, "\n");
  461. }
  462. }
  463. #endif // MICROPY_DEBUG_PRINTERS