mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-17 16:38:22 +00:00
Make TypeStructl.tags a pointer from a slice (reduce memory usage)
This commit is contained in:
@@ -130,7 +130,7 @@ enum StructSoaKind : u8 {
|
||||
|
||||
struct TypeStruct {
|
||||
Slice<Entity *> fields;
|
||||
Slice<String> tags;
|
||||
String * tags; // count == fields.count
|
||||
i64 * offsets; // count == fields.count
|
||||
|
||||
Ast * node;
|
||||
@@ -140,7 +140,6 @@ struct TypeStruct {
|
||||
Type * polymorphic_params; // Type_Tuple
|
||||
Type * polymorphic_parent;
|
||||
|
||||
|
||||
Type * soa_elem;
|
||||
i32 soa_count;
|
||||
StructSoaKind soa_kind;
|
||||
@@ -2174,12 +2173,6 @@ bool are_types_identical(Type *x, Type *y) {
|
||||
if (xf_is_using ^ yf_is_using) {
|
||||
return false;
|
||||
}
|
||||
if (x->Struct.tags.count != y->Struct.tags.count) {
|
||||
return false;
|
||||
}
|
||||
if (x->Struct.tags.count > 0 && x->Struct.tags[i] != y->Struct.tags[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user