Skip to content

Commit 2d1fecc

Browse files
committed
Revert "py/vm: Improve performance of opcode dispatch when using switch stmt."
This reverts commit 869024d. Ctrl-C stopped producing KeyboardInterrupt with this change on CircuitPython. The Unix and stm32 ports handles Ctrl-C differently with a handler which is probably why they where not affected. Fixes #1092
1 parent d1b5883 commit 2d1fecc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/vm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ mp_vm_return_kind_t mp_execute_bytecode(mp_code_state_t *code_state, volatile mp
136136
#define ENTRY(op) entry_##op
137137
#define ENTRY_DEFAULT entry_default
138138
#else
139-
#define DISPATCH() goto dispatch_loop
139+
#define DISPATCH() break
140140
#define DISPATCH_WITH_PEND_EXC_CHECK() goto pending_exception_check
141141
#define ENTRY(op) case op
142142
#define ENTRY_DEFAULT default

0 commit comments

Comments
 (0)