diff options
| author | gingerBill <bill@gingerbill.org> | 2022-11-08 11:13:46 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-11-08 11:13:46 +0000 |
| commit | 810a1eee41cc8e047759c8934af70d6e68113082 (patch) | |
| tree | e24c9cd4ae4e63997ae5ffd636b55d923adc2e8e /src/checker.cpp | |
| parent | e3e225d21b613d789ebad0273b198b5509800bf0 (diff) | |
Remove the need for `type->Map.internal_type` and replace with the definition of `runtime.Raw_Map`
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index d5d2c6026..fa3ef245b 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -1933,7 +1933,8 @@ void add_type_info_type_internal(CheckerContext *c, Type *t) { init_map_internal_types(bt); add_type_info_type_internal(c, bt->Map.key); add_type_info_type_internal(c, bt->Map.value); - add_type_info_type_internal(c, bt->Map.internal_type); + add_type_info_type_internal(c, t_uintptr); // hash value + add_type_info_type_internal(c, t_allocator); break; case Type_Tuple: @@ -2155,7 +2156,8 @@ void add_min_dep_type_info(Checker *c, Type *t) { init_map_internal_types(bt); add_min_dep_type_info(c, bt->Map.key); add_min_dep_type_info(c, bt->Map.value); - add_min_dep_type_info(c, bt->Map.internal_type); + add_min_dep_type_info(c, t_uintptr); // hash value + add_min_dep_type_info(c, t_allocator); break; case Type_Tuple: @@ -2845,9 +2847,10 @@ void init_core_map_type(Checker *c) { if (t_map_info != nullptr) { return; } - t_map_info = find_core_type(c, str_lit("Map_Info")); - t_map_cell_info = find_core_type(c, str_lit("Map_Cell_Info")); init_mem_allocator(c); + t_map_info = find_core_type(c, str_lit("Map_Info")); + t_map_cell_info = find_core_type(c, str_lit("Map_Cell_Info")); + t_raw_map = find_core_type(c, str_lit("Raw_Map")); } void init_preload(Checker *c) { |