aboutsummaryrefslogtreecommitdiff
path: root/py/vm.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-03-16 11:39:27 +1100
committerDamien George <damien@micropython.org>2022-03-16 11:59:46 +1100
commit1692cad6733b82b1cb7631ce10c1ddb54e66058e (patch)
treefc5a2bad1a2616d119875c81a12fd758108d0eea /py/vm.c
parent962ad8622e4c732f76ecbf8d5191ba8216d244d3 (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/vm.c')
-rw-r--r--py/vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/vm.c b/py/vm.c
index b762c92bf..497a56962 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -44,7 +44,7 @@
#else
#define TRACE_PREFIX mp_printf(&mp_plat_print, "sp=%d ", (int)(sp - &code_state->state[0] + 1))
#endif
-#define TRACE(ip) TRACE_PREFIX; mp_bytecode_print2(&mp_plat_print, ip, 1, &code_state->fun_bc->context->constants);
+#define TRACE(ip) TRACE_PREFIX; mp_bytecode_print2(&mp_plat_print, ip, 1, code_state->fun_bc->child_table, &code_state->fun_bc->context->constants);
#else
#define TRACE(ip)
#endif