diff options
author | Damien George <damien@micropython.org> | 2022-03-29 22:37:58 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-03-30 16:31:53 +1100 |
commit | df9a4122062ff706ad4b6a76cb5bc16d1a23d384 (patch) | |
tree | 7d1ed6971c026329f16c53c150f49fb650046393 /py/compile.c | |
parent | 594c753c27c07df2a1b36e4eb772a6a2165eee9c (diff) |
py/compile: Only show raw code that is bytecode.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/compile.c')
-rw-r--r-- | py/compile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/py/compile.c b/py/compile.c index d61dabb9a..36f33f97f 100644 --- a/py/compile.c +++ b/py/compile.c @@ -3636,7 +3636,9 @@ mp_compiled_module_t mp_compile_to_raw_code(mp_parse_tree_t *parse_tree, qstr so if (mp_verbose_flag >= 2) { for (scope_t *s = comp->scope_head; s != NULL; s = s->next) { mp_raw_code_t *rc = s->raw_code; - mp_bytecode_print(&mp_plat_print, rc, &cm.context->constants); + if (rc->kind == MP_CODE_BYTECODE) { + mp_bytecode_print(&mp_plat_print, rc, &cm.context->constants); + } } } #endif |