summaryrefslogtreecommitdiff
path: root/py/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/vm.c')
-rw-r--r--py/vm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/py/vm.c b/py/vm.c
index 283d8e198..890b5f26f 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -129,12 +129,21 @@ mp_vm_return_kind_t PLACE_IN_ITCM(mp_execute_bytecode)(mp_code_state_t *code_sta
#endif
#if MICROPY_OPT_COMPUTED_GOTO
#include "py/vmentrytable.h"
+#if MICROPY_OPT_COMPUTED_GOTO_SAVE_SPACE
#define ONE_TRUE_DISPATCH() one_true_dispatch: do { \
TRACE(ip); \
MARK_EXC_IP_GLOBAL(); \
goto *(void*)((char*)&&entry_MP_BC_LOAD_CONST_FALSE + entry_table[*ip++]); \
} while (0)
#define DISPATCH() do { goto one_true_dispatch; } while(0)
+#else
+ #define DISPATCH() do { \
+ TRACE(ip); \
+ MARK_EXC_IP_GLOBAL(); \
+ goto *entry_table[*ip++]; \
+ } while (0)
+ #define ONE_TRUE_DISPATCH() DISPATCH()
+#endif
#define DISPATCH_WITH_PEND_EXC_CHECK() goto pending_exception_check
#define ENTRY(op) entry_##op
#define ENTRY_DEFAULT entry_default