Delay determination of procedure abi types until as late as possible to prevent type undetermination in self-referential data types #454

This commit is contained in:
gingerBill
2019-10-31 18:25:39 +00:00
parent 4aad45e3e7
commit ee8d3e03f8
5 changed files with 29 additions and 12 deletions

View File

@@ -3038,6 +3038,7 @@ irValue *ir_emit_call(irProcedure *p, irValue *value, Array<irValue *> const &ar
context_ptr = ir_find_or_generate_context_ptr(p);
}
set_procedure_abi_types(heap_allocator(), pt);
bool is_c_vararg = pt->Proc.c_vararg;
isize param_count = pt->Proc.param_count;
@@ -10019,6 +10020,8 @@ void ir_insert_code_before_proc(irProcedure* proc, irProcedure *parent) {
void ir_build_proc(irValue *value, irProcedure *parent) {
irProcedure *proc = &value->Proc;
set_procedure_abi_types(heap_allocator(), proc->type);
proc->parent = parent;
if (proc->body != nullptr) {