diff options
Diffstat (limited to 'py/vm.c')
-rw-r--r-- | py/vm.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -14,6 +14,11 @@ #include "objgenerator.h" #define DETECT_VM_STACK_OVERFLOW (0) +#if 0 +#define TRACE(ip) mp_byte_code_print2(ip, 1); +#else +#define TRACE(ip) +#endif // Value stack grows up (this makes it incompatible with native C stack, but // makes sure that arguments to functions are in natural order arg1..argN @@ -168,6 +173,7 @@ mp_vm_return_kind_t mp_execute_byte_code_2(const byte *code_info, const byte **i #if MICROPY_USE_COMPUTED_GOTO #include "vmentrytable.h" #define DISPATCH() do { \ + TRACE(ip); \ save_ip = ip; \ op = *ip++; \ goto *entry_table[op]; \ @@ -223,6 +229,7 @@ dispatch_loop: #if MICROPY_USE_COMPUTED_GOTO DISPATCH(); #else + TRACE(ip); save_ip = ip; op = *ip++; |