Minor changes

This commit is contained in:
gingerBill
2026-03-17 08:10:13 +00:00
parent cb7a87773b
commit f7ede8632f
3 changed files with 14 additions and 7 deletions

View File

@@ -978,7 +978,6 @@ gb_internal void set_base_type(Type *t, Type *base) {
gb_internal Type *alloc_type(TypeKind kind) {
// gbAllocator a = heap_allocator();
Type *t = permanent_alloc_item<Type>();
t->kind = kind;
t->cached_size = -1;
@@ -1139,8 +1138,8 @@ gb_internal Type *alloc_type_union() {
gb_internal Type *alloc_type_enum() {
Type *t = alloc_type(Type_Enum);
t->Enum.min_value = gb_alloc_item(permanent_allocator(), ExactValue);
t->Enum.max_value = gb_alloc_item(permanent_allocator(), ExactValue);
t->Enum.min_value = permanent_alloc_item<ExactValue>();
t->Enum.max_value = permanent_alloc_item<ExactValue>();
return t;
}
@@ -3049,6 +3048,10 @@ gb_internal bool are_types_identical_unique_tuples(Type *x, Type *y) {
return false;
}
if (x->canonical_hash && y->canonical_hash && x->canonical_hash != y->canonical_hash) {
return false;
}
// MUTEX_GUARD(&g_type_mutex);
return are_types_identical_internal(x, y, true);
}
@@ -3063,6 +3066,10 @@ gb_internal bool are_types_identical_internal(Type *x, Type *y, bool check_tuple
return false;
}
if (x->canonical_hash && y->canonical_hash && x->canonical_hash != y->canonical_hash) {
return false;
}
#if 0
if (x->kind == Type_Named) {
Entity *e = x->Named.type_name;