summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--py/emitnative.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/emitnative.c b/py/emitnative.c
index 7071062a7..5b16990fe 100644
--- a/py/emitnative.c
+++ b/py/emitnative.c
@@ -310,6 +310,9 @@ STATIC void emit_native_start_pass(emit_t *emit, pass_kind_t pass, scope_t *scop
// work out size of state (locals plus stack)
emit->n_state = scope->num_locals + scope->stack_size;
+ // the locals and stack start after the code_state structure
+ emit->stack_start = STATE_START;
+
// allocate space on C-stack for code_state structure, which includes state
ASM_ENTRY(emit->as, STATE_START + emit->n_state);