Push context onto stack before evaluating procedure parameters

Fixes #4711
This commit is contained in:
Feoramund
2025-06-20 16:11:08 -04:00
parent 8e782d9a00
commit 378e72b211
+3 -3
View File
@@ -546,6 +546,9 @@ gb_internal void lb_begin_procedure_body(lbProcedure *p) {
GB_ASSERT(p->type != nullptr); GB_ASSERT(p->type != nullptr);
lb_ensure_abi_function_type(p->module, p); lb_ensure_abi_function_type(p->module, p);
if (p->type->Proc.calling_convention == ProcCC_Odin) {
lb_push_context_onto_stack_from_implicit_parameter(p);
}
{ {
lbFunctionType *ft = p->abi_function_type; lbFunctionType *ft = p->abi_function_type;
@@ -743,9 +746,6 @@ gb_internal void lb_begin_procedure_body(lbProcedure *p) {
} }
} }
if (p->type->Proc.calling_convention == ProcCC_Odin) {
lb_push_context_onto_stack_from_implicit_parameter(p);
}
lb_set_debug_position_to_procedure_begin(p); lb_set_debug_position_to_procedure_begin(p);
if (p->debug_info != nullptr) { if (p->debug_info != nullptr) {