Remove the semantics of #no_copy, keep the grammar

This commit is contained in:
gingerBill
2025-07-30 23:14:29 +01:00
parent aa6a749804
commit 7057fc8dfc
8 changed files with 2 additions and 43 deletions

View File

@@ -155,7 +155,6 @@ struct TypeStruct {
bool are_offsets_being_processed : 1;
bool is_packed : 1;
bool is_raw_union : 1;
bool is_no_copy : 1;
bool is_poly_specialized : 1;
};
@@ -1780,10 +1779,6 @@ gb_internal bool is_type_raw_union(Type *t) {
t = base_type(t);
return (t->kind == Type_Struct && t->Struct.is_raw_union);
}
gb_internal bool is_type_no_copy(Type *t) {
t = base_type(t);
return (t->kind == Type_Struct && t->Struct.is_no_copy);
}
gb_internal bool is_type_enum(Type *t) {
t = base_type(t);
return (t->kind == Type_Enum);
@@ -2859,7 +2854,6 @@ gb_internal bool are_types_identical_internal(Type *x, Type *y, bool check_tuple
case Type_Struct:
if (x->Struct.is_raw_union == y->Struct.is_raw_union &&
x->Struct.is_no_copy == y->Struct.is_no_copy &&
x->Struct.fields.count == y->Struct.fields.count &&
x->Struct.is_packed == y->Struct.is_packed &&
x->Struct.soa_kind == y->Struct.soa_kind &&
@@ -4832,7 +4826,6 @@ gb_internal gbString write_type_to_string(gbString str, Type *type, bool shortha
if (type->Struct.is_packed) str = gb_string_appendc(str, " #packed");
if (type->Struct.is_raw_union) str = gb_string_appendc(str, " #raw_union");
if (type->Struct.is_no_copy) str = gb_string_appendc(str, " #no_copy");
if (type->Struct.custom_align != 0) str = gb_string_append_fmt(str, " #align %d", cast(int)type->Struct.custom_align);
str = gb_string_appendc(str, " {");