diff options
| author | gingerBill <bill@gingerbill.org> | 2022-09-21 12:09:05 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-09-21 12:09:05 +0100 |
| commit | 1d793ea33810036d1c93f9cae666e91fa15ee22a (patch) | |
| tree | bcbe0b6cbb1c3d2c9061806918e6c00ada9622d7 /src/checker.cpp | |
| parent | 5337413c5605655847767105f609d74a357984da (diff) | |
Split header table data and the map pointer
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index cdc0630bf..e30dea6e1 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -2831,23 +2831,12 @@ void init_core_source_code_location(Checker *c) { } void init_core_map_type(Checker *c) { - if (t_map_hash == nullptr) { - Entity *e = find_core_entity(c, str_lit("Map_Hash")); - if (e->state == EntityState_Unresolved) { - check_entity_decl(&c->builtin_ctx, e, nullptr, nullptr); - } - t_map_hash = e->type; - GB_ASSERT(t_map_hash != nullptr); - } - - if (t_map_header == nullptr) { - Entity *e = find_core_entity(c, str_lit("Map_Header")); - if (e->state == EntityState_Unresolved) { - check_entity_decl(&c->builtin_ctx, e, nullptr, nullptr); - } - t_map_header = e->type; - GB_ASSERT(t_map_header != nullptr); + if (t_map_hash != nullptr) { + return; } + t_map_hash = find_core_type(c, str_lit("Map_Hash")); + t_map_header = find_core_type(c, str_lit("Map_Header")); + t_map_header_table = find_core_type(c, str_lit("Map_Header_Table")); } void init_preload(Checker *c) { |