Fix more #soa changes

This commit is contained in:
gingerBill
2024-05-16 17:15:38 +01:00
parent 7cf62f00c3
commit 575b268e88
3 changed files with 15 additions and 0 deletions

View File

@@ -999,6 +999,17 @@ gb_internal Type *alloc_type_pointer_to_multi_pointer(Type *ptr) {
return original_type;
}
gb_internal Type *alloc_type_multi_pointer_to_pointer(Type *ptr) {
Type *original_type = ptr;
ptr = base_type(ptr);
if (ptr->kind == Type_MultiPointer) {
return alloc_type_pointer(ptr->MultiPointer.elem);
} else if (ptr->kind != Type_Pointer) {
GB_PANIC("Invalid type: %s", type_to_string(original_type));
}
return original_type;
}
gb_internal Type *alloc_type_array(Type *elem, i64 count, Type *generic_count = nullptr) {
if (generic_count != nullptr) {
Type *t = alloc_type(Type_Array);