diff options
| author | gingerBill <bill@gingerbill.org> | 2020-11-29 15:27:53 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-11-29 15:27:53 +0000 |
| commit | 97c66c9c732af1e0735ee3f48a8af08b199bddf9 (patch) | |
| tree | aaedfa7f85390520f3d6d60064cedd8a4cb9af17 /src/types.cpp | |
| parent | 085972bb2ccde65d148b7fdc07b7ea8329e46293 (diff) | |
Add `intrinsics.type_hasher_proc`; Make `map` work with generic hasher procedure
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/types.cpp b/src/types.cpp index 75783f948..5c8db71e1 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -690,7 +690,8 @@ gb_global Type *t_map_header = nullptr; gb_global Type *t_vector_x86_mmx = nullptr; -gb_global Type *t_equal_proc = nullptr; +gb_global Type *t_equal_proc = nullptr; +gb_global Type *t_hasher_proc = nullptr; i64 type_size_of (Type *t); @@ -1949,6 +1950,9 @@ bool is_type_simple_compare(Type *t) { if (t->Basic.flags & BasicFlag_SimpleCompare) { return true; } + if (t->Basic.kind == Basic_typeid) { + return true; + } return false; case Type_Pointer: |