diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2022-09-21 16:07:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-21 16:07:36 +0100 |
| commit | 29c5e390aa4e78715e1977a299ae3f3e4e9337e9 (patch) | |
| tree | 356beb6aa5a1b480083556dc8cc969ae65a2fb05 /src/checker.cpp | |
| parent | 3455e5690ce8d09eda37bff8478dadae73160af1 (diff) | |
| parent | a6d3cbe824b3ab6849af3f1c4abb94d7a72ed801 (diff) | |
Merge pull request #2063 from odin-lang/map-header-changes
Map header changes
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) { |