diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2022-12-09 18:59:38 +0100 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2022-12-11 17:17:58 +0100 |
commit | 6d799f0aed18be25a5c908499b6411ab6d06b78c (patch) | |
tree | 3e6a91048c7fe3e78bae9f75b24eb37c5504681b /gcc/d/dmd/clone.d | |
parent | cc7f509d3c0b3ab63891cf7ca2def0fdfb3642c4 (diff) | |
download | gcc-6d799f0aed18be25a5c908499b6411ab6d06b78c.zip gcc-6d799f0aed18be25a5c908499b6411ab6d06b78c.tar.gz gcc-6d799f0aed18be25a5c908499b6411ab6d06b78c.tar.bz2 |
d: Merge upstream dmd, druntime c8ae4adb2e, phobos 792c8b7c1.
D front-end changes:
- Import dmd v2.101.0.
- Deprecate the ability to call `__traits(getAttributes)' on
overload sets.
- Deprecate non-empty `for' statement increment clause with no
effect.
- Array literals assigned to `scope' array variables can now be
allocated on the stack.
D runtime changes:
- Import druntime v2.101.0.
Phobos changes:
- Import phobos v2.101.0.
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd c8ae4adb2e.
* typeinfo.cc (check_typeinfo_type): Update for new front-end
interface.
(TypeInfoVisitor::visit (TypeInfoStructDeclaration *)): Remove warning
that toHash() must be declared 'nothrow @safe`.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime c8ae4adb2e.
* src/MERGE: Merge upstream phobos 792c8b7c1.
Diffstat (limited to 'gcc/d/dmd/clone.d')
-rw-r--r-- | gcc/d/dmd/clone.d | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/d/dmd/clone.d b/gcc/d/dmd/clone.d index c999048..c030d35 100644 --- a/gcc/d/dmd/clone.d +++ b/gcc/d/dmd/clone.d @@ -870,17 +870,17 @@ void buildDtors(AggregateDeclaration ad, Scope* sc) return; // unions don't have destructors StorageClass stc = STC.safe | STC.nothrow_ | STC.pure_ | STC.nogc; - Loc declLoc = ad.userDtors.dim ? ad.userDtors[0].loc : ad.loc; + Loc declLoc = ad.userDtors.length ? ad.userDtors[0].loc : ad.loc; Loc loc; // internal code should have no loc to prevent coverage FuncDeclaration xdtor_fwd = null; // Build the field destructor (`ad.fieldDtor`), if needed. // If the user dtor is an extern(C++) prototype, then we expect it performs a full-destruction and skip building. - const bool dtorIsCppPrototype = ad.userDtors.dim && ad.userDtors[0]._linkage == LINK.cpp && !ad.userDtors[0].fbody; + const bool dtorIsCppPrototype = ad.userDtors.length && ad.userDtors[0]._linkage == LINK.cpp && !ad.userDtors[0].fbody; if (!dtorIsCppPrototype) { Expression e = null; - for (size_t i = 0; i < ad.fields.dim; i++) + for (size_t i = 0; i < ad.fields.length; i++) { auto v = ad.fields[i]; if (v.storage_class & STC.ref_) @@ -985,7 +985,7 @@ void buildDtors(AggregateDeclaration ad, Scope* sc) } // Set/build `ad.aggrDtor` - switch (dtors.dim) + switch (dtors.length) { case 0: break; @@ -1168,7 +1168,7 @@ private DtorDeclaration buildExternDDtor(AggregateDeclaration ad, Scope* sc) */ FuncDeclaration buildInv(AggregateDeclaration ad, Scope* sc) { - switch (ad.invs.dim) + switch (ad.invs.length) { case 0: return null; @@ -1225,11 +1225,11 @@ FuncDeclaration buildPostBlit(StructDeclaration sd, Scope* sc) if (sd.isUnionDeclaration()) return null; - const hasUserDefinedPosblit = sd.postblits.dim && !sd.postblits[0].isDisabled ? true : false; + const hasUserDefinedPosblit = sd.postblits.length && !sd.postblits[0].isDisabled ? true : false; // by default, the storage class of the created postblit StorageClass stc = STC.safe | STC.nothrow_ | STC.pure_ | STC.nogc; - Loc declLoc = sd.postblits.dim ? sd.postblits[0].loc : sd.loc; + Loc declLoc = sd.postblits.length ? sd.postblits[0].loc : sd.loc; Loc loc; // internal code should have no loc to prevent coverage // if any of the postblits are disabled, then the generated postblit @@ -1240,7 +1240,7 @@ FuncDeclaration buildPostBlit(StructDeclaration sd, Scope* sc) VarDeclaration[] fieldsToDestroy; auto postblitCalls = new Statements(); // iterate through all the struct fields that are not disabled - for (size_t i = 0; i < sd.fields.dim && !(stc & STC.disable); i++) + for (size_t i = 0; i < sd.fields.length && !(stc & STC.disable); i++) { auto structField = sd.fields[i]; if (structField.storage_class & STC.ref_) @@ -1411,7 +1411,7 @@ FuncDeclaration buildPostBlit(StructDeclaration sd, Scope* sc) } // Build our own "postblit" which executes a, but only if needed. - if (postblitCalls.dim || (stc & STC.disable)) + if (postblitCalls.length || (stc & STC.disable)) { //printf("Building __fieldPostBlit()\n"); checkShared(); @@ -1426,7 +1426,7 @@ FuncDeclaration buildPostBlit(StructDeclaration sd, Scope* sc) // create __xpostblit, which is the generated postblit FuncDeclaration xpostblit = null; - switch (sd.postblits.dim) + switch (sd.postblits.length) { case 0: break; |