diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-06-04 22:36:26 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-06-04 23:27:12 +0200 |
commit | 2cbc99d18dc411ac3fdef94e22ce86859806e63c (patch) | |
tree | 82939940413c5e726889ccd97fa2afd33e0b06be /gcc/d/dmd/clone.c | |
parent | 4e05c918d28e3fa66f5baaf556f6886447c68c9a (diff) | |
download | gcc-2cbc99d18dc411ac3fdef94e22ce86859806e63c.zip gcc-2cbc99d18dc411ac3fdef94e22ce86859806e63c.tar.gz gcc-2cbc99d18dc411ac3fdef94e22ce86859806e63c.tar.bz2 |
d: Merge upstream dmd 48d704f08
Updates the Array interface in dmd/root/array.h to use a DArray<TYPE>
internally. Splits out BitArray into a separate header.
Reviewed-on: https://github.com/dlang/dmd/pull/11219
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 48d704f08.
* d-attribs.cc (build_attributes): Use new field name.
* d-builtins.cc (build_frontend_type): Likewise.
(maybe_set_builtin_1): Likewise.
(d_maybe_set_builtin): Likewise.
* d-codegen.cc (build_interface_binfo): Likewise.
(identity_compare_p): Likewise.
(lower_struct_comparison): Likewise.
(build_struct_comparison): Likewise.
(d_build_call): Likewise.
(build_frame_type): Likewise.
(build_closure): Likewise.
* d-compiler.cc (Compiler::paintAsType): Likewise.
(Compiler::loadModule): Likewise.
* d-incpath.cc (add_globalpaths): Likewise.
(add_filepaths): Likewise.
(add_import_paths): Likewise.
* d-lang.cc (deps_write): Likewise.
(d_parse_file): Likewise.
* decl.cc (gcc_attribute_p): Likewise.
(base_vtable_offset): Likewise.
(get_vtable_decl): Likewise.
(build_class_instance): Likewise.
* expr.cc (class ExprVisitor): Likewise.
* modules.cc (layout_moduleinfo_fields): Likewise.
(layout_moduleinfo): Likewise.
(build_module_tree): Likewise.
* toir.cc (class IRVisitor): Likewise.
* typeinfo.cc (class TypeInfoVisitor): Likewise.
(layout_classinfo_interfaces): Likewise.
* types.cc (layout_aggregate_members): Likewise.
(layout_aggregate_type): Likewise.
Diffstat (limited to 'gcc/d/dmd/clone.c')
-rw-r--r-- | gcc/d/dmd/clone.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/gcc/d/dmd/clone.c b/gcc/d/dmd/clone.c index 73c932b..7f91a10 100644 --- a/gcc/d/dmd/clone.c +++ b/gcc/d/dmd/clone.c @@ -119,7 +119,7 @@ FuncDeclaration *hasIdentityOpAssign(AggregateDeclaration *ad, Scope *sc) return NULL; int varargs; Parameters *fparams = f->getParameters(&varargs); - if (fparams->dim >= 1) + if (fparams->length >= 1) { Parameter *fparam0 = Parameter::getNth(fparams, 0); if (fparam0->type->toDsymbol(NULL) != ad) @@ -153,7 +153,7 @@ bool needOpAssign(StructDeclaration *sd) /* If any of the fields need an opAssign, then we * need it too. */ - for (size_t i = 0; i < sd->fields.dim; i++) + for (size_t i = 0; i < sd->fields.length; i++) { VarDeclaration *v = sd->fields[i]; if (v->storage_class & STCref) @@ -220,7 +220,7 @@ FuncDeclaration *buildOpAssign(StructDeclaration *sd, Scope *sc) // check for it. // In this event, it will be reflected by having `stc` (opAssign's // storage class) include `STCdisabled`. - for (size_t i = 0; i < sd->fields.dim; i++) + for (size_t i = 0; i < sd->fields.length; i++) { VarDeclaration *v = sd->fields[i]; if (v->storage_class & STCref) @@ -294,7 +294,7 @@ FuncDeclaration *buildOpAssign(StructDeclaration *sd, Scope *sc) * In both cases, it will change the parent context. */ //printf("\tmemberwise copy\n"); - for (size_t i = 0; i < sd->fields.dim; i++) + for (size_t i = 0; i < sd->fields.length; i++) { VarDeclaration *v = sd->fields[i]; // this.v = s.v; @@ -361,7 +361,7 @@ bool needOpEquals(StructDeclaration *sd) /* If any of the fields has an opEquals, then we * need it too. */ - for (size_t i = 0; i < sd->fields.dim; i++) + for (size_t i = 0; i < sd->fields.length; i++) { VarDeclaration *v = sd->fields[i]; if (v->storage_class & STCref) @@ -666,7 +666,7 @@ bool needToHash(StructDeclaration *sd) /* If any of the fields has an opEquals, then we * need it too. */ - for (size_t i = 0; i < sd->fields.dim; i++) + for (size_t i = 0; i < sd->fields.length; i++) { VarDeclaration *v = sd->fields[i]; if (v->storage_class & STCref) @@ -785,16 +785,16 @@ FuncDeclaration *buildPostBlit(StructDeclaration *sd, Scope *sc) return NULL; StorageClass stc = STCsafe | STCnothrow | STCpure | STCnogc; - Loc declLoc = sd->postblits.dim ? sd->postblits[0]->loc : sd->loc; + Loc declLoc = sd->postblits.length ? sd->postblits[0]->loc : sd->loc; Loc loc = Loc(); // internal code should have no loc to prevent coverage - for (size_t i = 0; i < sd->postblits.dim; i++) + for (size_t i = 0; i < sd->postblits.length; i++) { stc |= sd->postblits[i]->storage_class & STCdisable; } Statements *a = new Statements(); - for (size_t i = 0; i < sd->fields.dim && !(stc & STCdisable); i++) + for (size_t i = 0; i < sd->fields.length && !(stc & STCdisable); i++) { VarDeclaration *v = sd->fields[i]; if (v->storage_class & STCref) @@ -918,7 +918,7 @@ FuncDeclaration *buildPostBlit(StructDeclaration *sd, Scope *sc) } // Build our own "postblit" which executes a, but only if needed. - if (a->dim || (stc & STCdisable)) + if (a->length || (stc & STCdisable)) { //printf("Building __fieldPostBlit()\n"); PostBlitDeclaration *dd = new PostBlitDeclaration(declLoc, Loc(), stc, Id::__fieldPostblit); @@ -931,7 +931,7 @@ FuncDeclaration *buildPostBlit(StructDeclaration *sd, Scope *sc) } FuncDeclaration *xpostblit = NULL; - switch (sd->postblits.dim) + switch (sd->postblits.length) { case 0: break; @@ -943,7 +943,7 @@ FuncDeclaration *buildPostBlit(StructDeclaration *sd, Scope *sc) default: Expression *e = NULL; stc = STCsafe | STCnothrow | STCpure | STCnogc; - for (size_t i = 0; i < sd->postblits.dim; i++) + for (size_t i = 0; i < sd->postblits.length; i++) { FuncDeclaration *fd = sd->postblits[i]; stc = mergeFuncAttrs(stc, fd); @@ -990,11 +990,11 @@ FuncDeclaration *buildDtor(AggregateDeclaration *ad, Scope *sc) return NULL; StorageClass stc = STCsafe | STCnothrow | STCpure | STCnogc; - Loc declLoc = ad->dtors.dim ? ad->dtors[0]->loc : ad->loc; + Loc declLoc = ad->dtors.length ? ad->dtors[0]->loc : ad->loc; Loc loc = Loc(); // internal code should have no loc to prevent coverage Expression *e = NULL; - for (size_t i = 0; i < ad->fields.dim; i++) + for (size_t i = 0; i < ad->fields.length; i++) { VarDeclaration *v = ad->fields[i]; if (v->storage_class & STCref) @@ -1078,7 +1078,7 @@ FuncDeclaration *buildDtor(AggregateDeclaration *ad, Scope *sc) } FuncDeclaration *xdtor = NULL; - switch (ad->dtors.dim) + switch (ad->dtors.length) { case 0: break; @@ -1090,7 +1090,7 @@ FuncDeclaration *buildDtor(AggregateDeclaration *ad, Scope *sc) default: e = NULL; stc = STCsafe | STCnothrow | STCpure | STCnogc; - for (size_t i = 0; i < ad->dtors.dim; i++) + for (size_t i = 0; i < ad->dtors.length; i++) { FuncDeclaration *fd = ad->dtors[i]; stc = mergeFuncAttrs(stc, fd); @@ -1138,7 +1138,7 @@ FuncDeclaration *buildInv(AggregateDeclaration *ad, Scope *sc) Loc declLoc = ad->loc; Loc loc = Loc(); // internal code should have no loc to prevent coverage - switch (ad->invs.dim) + switch (ad->invs.length) { case 0: return NULL; @@ -1150,7 +1150,7 @@ FuncDeclaration *buildInv(AggregateDeclaration *ad, Scope *sc) default: Expression *e = NULL; StorageClass stcx = 0; - for (size_t i = 0; i < ad->invs.dim; i++) + for (size_t i = 0; i < ad->invs.length; i++) { stc = mergeFuncAttrs(stc, ad->invs[i]); if (stc & STCdisable) |