diff options
author | Damien George <damien@micropython.org> | 2022-03-16 11:39:27 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-03-16 11:59:46 +1100 |
commit | 1692cad6733b82b1cb7631ce10c1ddb54e66058e (patch) | |
tree | fc5a2bad1a2616d119875c81a12fd758108d0eea /py/compile.c | |
parent | 962ad8622e4c732f76ecbf8d5191ba8216d244d3 (diff) |
py/showbc: Remove global variables and make DECODE_PTR work correctly.
The bytecode state variables mp_showbc_code_start and mp_showbc_constants
have been removed and made local variables passed into the various
functions.
As part of this, the DECODE_PTR macro is fixed so it extracts the relevant
pointer from the child_table (a regression introduced in
f2040bfc7ee033e48acef9f289790f3b4e6b74e5).
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/compile.c')
-rw-r--r-- | py/compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/compile.c b/py/compile.c index 2e719206f..eb7389ec5 100644 --- a/py/compile.c +++ b/py/compile.c @@ -3632,7 +3632,7 @@ 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, rc->fun_data, rc->fun_data_len, &cm.context->constants); + mp_bytecode_print(&mp_plat_print, rc, &cm.context->constants); } } #endif |