map type internal reorganization

This commit is contained in:
gingerBill
2020-11-23 16:56:31 +00:00
parent 67bc35e882
commit 4762d2f2d1
7 changed files with 66 additions and 67 deletions

View File

@@ -2278,14 +2278,14 @@ void init_core_source_code_location(Checker *c) {
}
void init_core_map_type(Checker *c) {
if (t_map_key == nullptr) {
Entity *e = find_core_entity(c, str_lit("Map_Key"));
if (t_map_hash == nullptr) {
Entity *e = find_core_entity(c, str_lit("Map_Hash"));
if (e->state == EntityState_Unresolved) {
auto ctx = c->init_ctx;
check_entity_decl(&ctx, e, nullptr, nullptr);
}
t_map_key = e->type;
GB_ASSERT(t_map_key != nullptr);
t_map_hash = e->type;
GB_ASSERT(t_map_hash != nullptr);
}
if (t_map_header == nullptr) {