diff options
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index 40a7ec947..2846aae86 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2526,18 +2526,16 @@ gb_internal void init_map_internal_types(Type *type) { gb_unused(type_size_of(metadata_type)); - // NOTE(bill): [0]^struct{key: Key, value: Value, hash: uintptr} - // This is a zero array to a pointer to keep the alignment to that of a pointer, and not effective the size of the final struct - metadata_type = alloc_type_array(alloc_type_pointer(metadata_type), 0);; + // NOTE(bill): ^struct{key: Key, value: Value, hash: uintptr} + metadata_type = alloc_type_pointer(metadata_type); Scope *scope = create_scope(nullptr, nullptr); Type *debug_type = alloc_type_struct(); - debug_type->Struct.fields = slice_make<Entity *>(permanent_allocator(), 4); - debug_type->Struct.fields[0] = alloc_entity_field(scope, make_token_ident("data"), t_uintptr, false, 0, EntityState_Resolved); + debug_type->Struct.fields = slice_make<Entity *>(permanent_allocator(), 3); + debug_type->Struct.fields[0] = alloc_entity_field(scope, make_token_ident("data"), metadata_type, false, 0, EntityState_Resolved); debug_type->Struct.fields[1] = alloc_entity_field(scope, make_token_ident("len"), t_int, false, 1, EntityState_Resolved); debug_type->Struct.fields[2] = alloc_entity_field(scope, make_token_ident("allocator"), t_allocator, false, 2, EntityState_Resolved); - debug_type->Struct.fields[3] = alloc_entity_field(scope, make_token_ident("__metadata"), metadata_type, false, 3, EntityState_Resolved); debug_type->Struct.scope = scope; debug_type->Struct.node = nullptr; wait_signal_set(&debug_type->Struct.fields_wait_signal); |