py/compile: Only show raw code that is bytecode.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2022-03-29 22:37:58 +11:00
parent 594c753c27
commit df9a412206

View File

@ -3636,9 +3636,11 @@ 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;
if (rc->kind == MP_CODE_BYTECODE) {
mp_bytecode_print(&mp_plat_print, rc, &cm.context->constants);
}
}
}
#endif
}