aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-09-10 20:45:26 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-09-10 20:45:26 +0100
commit0476d33a6c3b0c730b0e0defc10b571b1037c14c (patch)
tree03c6fcd5a86fc8abd69e443c97263c14cc16b805 /src/types.cpp
parentd3602ca634061bda4561a05c37f4fe3a828ad1e6 (diff)
Remove global `PtrMap<Type *, GenTypesData *>` and store on the `TypeNamed` directly
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 44f9394c7..3ccc74996 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -206,13 +206,18 @@ struct TypeProc {
bool optional_ok;
};
+struct TypeNamed {
+ String name;
+ Type * base;
+ Entity *type_name; /* Entity_TypeName */
+
+ BlockingMutex gen_types_data_mutex;
+ GenTypesData *gen_types_data;
+};
+
#define TYPE_KINDS \
TYPE_KIND(Basic, BasicType) \
- TYPE_KIND(Named, struct { \
- String name; \
- Type * base; \
- Entity *type_name; /* Entity_TypeName */ \
- }) \
+ TYPE_KIND(Named, TypeNamed) \
TYPE_KIND(Generic, struct { \
i64 id; \
String name; \