diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-11-05 13:44:14 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-11-05 13:44:14 +0000 |
| commit | fc2cb8fb39c510bf6d91a7dcef415840a843cd9c (patch) | |
| tree | 953c21f29aa9a57c1c25071251f5f3fc3c9478b9 /src | |
| parent | c937d38db2b31b885256b9aac0d606032f6c5343 (diff) | |
Remove `#no_copy`
Diffstat (limited to 'src')
| -rw-r--r-- | src/parser.cpp | 11 | ||||
| -rw-r--r-- | src/tilde_type_info.cpp | 12 |
2 files changed, 7 insertions, 16 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index d3b35f3f4..06703d643 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -1230,7 +1230,7 @@ gb_internal Ast *ast_dynamic_array_type(AstFile *f, Token token, Ast *elem) { } gb_internal Ast *ast_struct_type(AstFile *f, Token token, Slice<Ast *> fields, isize field_count, - Ast *polymorphic_params, bool is_packed, bool is_raw_union, bool is_no_copy, bool is_all_or_none, + Ast *polymorphic_params, bool is_packed, bool is_raw_union, bool is_all_or_none, Ast *align, Ast *min_field_align, Ast *max_field_align, Token where_token, Array<Ast *> const &where_clauses) { Ast *result = alloc_ast_node(f, Ast_StructType); @@ -1240,7 +1240,6 @@ gb_internal Ast *ast_struct_type(AstFile *f, Token token, Slice<Ast *> fields, i result->StructType.polymorphic_params = polymorphic_params; result->StructType.is_packed = is_packed; result->StructType.is_raw_union = is_raw_union; - result->StructType.is_no_copy = is_no_copy; result->StructType.is_all_or_none = is_all_or_none; result->StructType.align = align; result->StructType.min_field_align = min_field_align; @@ -2776,7 +2775,6 @@ gb_internal Ast *parse_operand(AstFile *f, bool lhs) { bool is_packed = false; bool is_all_or_none = false; bool is_raw_union = false; - bool no_copy = false; Ast *align = nullptr; Ast *min_field_align = nullptr; Ast *max_field_align = nullptr; @@ -2863,11 +2861,6 @@ gb_internal Ast *parse_operand(AstFile *f, bool lhs) { syntax_error(tag, "Duplicate struct tag '#%.*s'", LIT(tag.string)); } is_raw_union = true; - } else if (tag.string == "no_copy") { - if (no_copy) { - syntax_error(tag, "Duplicate struct tag '#%.*s'", LIT(tag.string)); - } - no_copy = true; } else { syntax_error(tag, "Invalid struct tag '#%.*s'", LIT(tag.string)); } @@ -2913,7 +2906,7 @@ gb_internal Ast *parse_operand(AstFile *f, bool lhs) { parser_check_polymorphic_record_parameters(f, polymorphic_params); return ast_struct_type(f, token, decls, name_count, - polymorphic_params, is_packed, is_raw_union, no_copy, is_all_or_none, + polymorphic_params, is_packed, is_raw_union, is_all_or_none, align, min_field_align, max_field_align, where_token, where_clauses); } break; diff --git a/src/tilde_type_info.cpp b/src/tilde_type_info.cpp index 58e8d3087..96a101376 100644 --- a/src/tilde_type_info.cpp +++ b/src/tilde_type_info.cpp @@ -783,14 +783,13 @@ gb_internal void cg_setup_type_info_data(cgModule *m) { i64 is_packed_offset = type_offset_of(tag_type, 5); i64 is_raw_union_offset = type_offset_of(tag_type, 6); - i64 is_no_copy_offset = type_offset_of(tag_type, 7); - i64 custom_align_offset = type_offset_of(tag_type, 8); + i64 custom_align_offset = type_offset_of(tag_type, 7); - i64 equal_offset = type_offset_of(tag_type, 9); + i64 equal_offset = type_offset_of(tag_type, 8); - i64 soa_kind_offset = type_offset_of(tag_type, 10); - i64 soa_base_type_offset = type_offset_of(tag_type, 11); - i64 soa_len_offset = type_offset_of(tag_type, 12); + i64 soa_kind_offset = type_offset_of(tag_type, 9); + i64 soa_base_type_offset = type_offset_of(tag_type, 10); + i64 soa_len_offset = type_offset_of(tag_type, 11); // TODO(bill): equal proc stuff gb_unused(equal_offset); @@ -825,7 +824,6 @@ gb_internal void cg_setup_type_info_data(cgModule *m) { set_bool(m, global, offset+is_packed_offset, t->Struct.is_packed); set_bool(m, global, offset+is_raw_union_offset, t->Struct.is_raw_union); - set_bool(m, global, offset+is_no_copy_offset, t->Struct.is_no_copy); set_bool(m, global, offset+custom_align_offset, t->Struct.custom_align != 0); if (t->Struct.soa_kind != StructSoa_None) { |