From 1d793ea33810036d1c93f9cae666e91fa15ee22a Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 21 Sep 2022 12:09:05 +0100 Subject: Split header table data and the map pointer --- src/checker.cpp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'src/checker.cpp') 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) { -- cgit v1.2.3