diff options
| author | gingerBill <bill@gingerbill.org> | 2025-02-20 11:12:59 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2025-02-20 11:12:59 +0000 |
| commit | 0ab323012e4fd0303a7e41587a5919c9be028561 (patch) | |
| tree | 7bbfad729e19919340c23499bc69f99fe2cf22f6 /src/types.cpp | |
| parent | 0946f6b48bf829deea145f751a1beb6d7967cd58 (diff) | |
Use `TypeSet` instead of `PtrSet<Type *>`
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/types.cpp b/src/types.cpp index 15e1bcf45..9b23fad0f 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -856,40 +856,6 @@ gb_internal void type_path_pop(TypePath *tp) { #define FAILURE_SIZE 0 #define FAILURE_ALIGNMENT 0 -gb_internal bool type_ptr_set_exists(PtrSet<Type *> *s, Type *t); - -gb_internal bool type_ptr_set_update(PtrSet<Type *> *s, Type *t) { - if (t == nullptr) { - return true; - } - if (type_ptr_set_exists(s, t)) { - return true; - } - ptr_set_add(s, t); - return false; -} - -gb_internal bool type_ptr_set_exists(PtrSet<Type *> *s, Type *t) { - if (t == nullptr) { - return true; - } - - if (ptr_set_exists(s, t)) { - return true; - } - - // TODO(bill, 2019-10-05): This is very slow and it's probably a lot - // faster to cache types correctly - for (Type *f : *s) { - if (are_types_identical(t, f)) { - ptr_set_add(s, t); - return true; - } - } - - return false; -} - gb_internal Type *base_type(Type *t) { for (;;) { if (t == nullptr) { |