diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2023-09-23 12:27:26 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2023-09-23 13:01:16 +0200 |
commit | d6679fa2d65316e80a267c94c17ad9e23f433f77 (patch) | |
tree | eca9ecef18b21760629c54620785c18bc4452bbd /gcc/d/dmd/dsymbol.d | |
parent | 59d27cc55a0588ed7b03bef804662cb844e8a24d (diff) | |
download | gcc-d6679fa2d65316e80a267c94c17ad9e23f433f77.zip gcc-d6679fa2d65316e80a267c94c17ad9e23f433f77.tar.gz gcc-d6679fa2d65316e80a267c94c17ad9e23f433f77.tar.bz2 |
d: Merge upstream dmd, druntime 4574d1728d, phobos d7e79f024.
D front-end changes:
- Import dmd v2.105.0.
- Catch clause must take only `const' or mutable exceptions.
- Creating a `scope' class instance with a non-scope constructor
is now `@system' only with `-fpreview=dip1000'.
- Global `const' variables can no longer be initialized from a
non-shared static constructor
D runtime changes:
- Import druntime v2.105.0.
Phobos changes:
- Import phobos v2.105.0.
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 4574d1728d.
* dmd/VERSION: Bump version to v2.105.0.
* d-diagnostic.cc (verror): Remove.
(verrorSupplemental): Remove.
(vwarning): Remove.
(vwarningSupplemental): Remove.
(vdeprecation): Remove.
(vdeprecationSupplemental): Remove.
(vmessage): Remove.
(vtip): Remove.
(verrorReport): New function.
(verrorReportSupplemental): New function.
* d-lang.cc (d_parse_file): Update for new front-end interface.
* decl.cc (d_mangle_decl): Update for new front-end interface.
* intrinsics.cc (maybe_set_intrinsic): Update for new front-end
interface.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime 4574d1728d.
* src/MERGE: Merge upstream phobos d7e79f024.
Diffstat (limited to 'gcc/d/dmd/dsymbol.d')
-rw-r--r-- | gcc/d/dmd/dsymbol.d | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/gcc/d/dmd/dsymbol.d b/gcc/d/dmd/dsymbol.d index 2373313..0fa4dbc 100644 --- a/gcc/d/dmd/dsymbol.d +++ b/gcc/d/dmd/dsymbol.d @@ -113,7 +113,7 @@ struct Ungag { uint oldgag; - extern (D) this(uint old) nothrow + extern (D) this(uint old) nothrow @safe { this.oldgag = old; } @@ -177,7 +177,7 @@ struct Visibility /** * Checks if `this` is absolutely identical visibility attribute to `other` */ - bool opEquals(ref const Visibility other) const + bool opEquals(ref const Visibility other) const @safe { if (this.kind == other.kind) { @@ -264,27 +264,27 @@ extern (C++) class Dsymbol : ASTNode PASS semanticRun = PASS.initial; ushort localNum; /// perturb mangled name to avoid collisions with those in FuncDeclaration.localsymtab - final extern (D) this() nothrow + final extern (D) this() nothrow @safe { //printf("Dsymbol::Dsymbol(%p)\n", this); loc = Loc(null, 0, 0); } - final extern (D) this(Identifier ident) nothrow + final extern (D) this(Identifier ident) nothrow @safe { //printf("Dsymbol::Dsymbol(%p, ident)\n", this); this.loc = Loc(null, 0, 0); this.ident = ident; } - final extern (D) this(const ref Loc loc, Identifier ident) nothrow + final extern (D) this(const ref Loc loc, Identifier ident) nothrow @safe { //printf("Dsymbol::Dsymbol(%p, ident)\n", this); this.loc = loc; this.ident = ident; } - static Dsymbol create(Identifier ident) nothrow + static Dsymbol create(Identifier ident) nothrow @safe { return new Dsymbol(ident); } @@ -353,9 +353,9 @@ extern (C++) class Dsymbol : ASTNode { if (this == o) return true; - if (o.dyncast() != DYNCAST.dsymbol) + const s = o.isDsymbol(); + if (!s) return false; - auto s = cast(Dsymbol)o; // Overload sets don't have an ident // Function-local declarations may have identical names // if they are declared in different scopes @@ -381,7 +381,7 @@ extern (C++) class Dsymbol : ASTNode { va_list ap; va_start(ap, format); - .verror(loc, format, ap, kind(), prettyFormatHelper().ptr); + .verrorReport(loc, format, ap, ErrorKind.error, kind(), prettyFormatHelper().ptr); va_end(ap); } @@ -390,7 +390,7 @@ extern (C++) class Dsymbol : ASTNode va_list ap; va_start(ap, format); const loc = getLoc(); - .verror(loc, format, ap, kind(), prettyFormatHelper().ptr); + .verrorReport(loc, format, ap, ErrorKind.error, kind(), prettyFormatHelper().ptr); va_end(ap); } @@ -398,7 +398,7 @@ extern (C++) class Dsymbol : ASTNode { va_list ap; va_start(ap, format); - .vdeprecation(loc, format, ap, kind(), prettyFormatHelper().ptr); + .verrorReport(loc, format, ap, ErrorKind.deprecation, kind(), prettyFormatHelper().ptr); va_end(ap); } @@ -407,7 +407,7 @@ extern (C++) class Dsymbol : ASTNode va_list ap; va_start(ap, format); const loc = getLoc(); - .vdeprecation(loc, format, ap, kind(), prettyFormatHelper().ptr); + .verrorReport(loc, format, ap, ErrorKind.deprecation, kind(), prettyFormatHelper().ptr); va_end(ap); } } @@ -417,7 +417,7 @@ extern (C++) class Dsymbol : ASTNode { va_list ap; va_start(ap, format); - .verror(loc, format, ap, kind(), prettyFormatHelper().ptr); + .verrorReport(loc, format, ap, ErrorKind.error, kind(), prettyFormatHelper().ptr); va_end(ap); } @@ -426,7 +426,7 @@ extern (C++) class Dsymbol : ASTNode va_list ap; va_start(ap, format); const loc = getLoc(); - .verror(loc, format, ap, kind(), prettyFormatHelper().ptr); + .verrorReport(loc, format, ap, ErrorKind.error, kind(), prettyFormatHelper().ptr); va_end(ap); } @@ -434,7 +434,7 @@ extern (C++) class Dsymbol : ASTNode { va_list ap; va_start(ap, format); - .vdeprecation(loc, format, ap, kind(), prettyFormatHelper().ptr); + .verrorReport(loc, format, ap, ErrorKind.deprecation, kind(), prettyFormatHelper().ptr); va_end(ap); } @@ -443,7 +443,7 @@ extern (C++) class Dsymbol : ASTNode va_list ap; va_start(ap, format); const loc = getLoc(); - .vdeprecation(loc, format, ap, kind(), prettyFormatHelper().ptr); + .verrorReport(loc, format, ap, ErrorKind.deprecation, kind(), prettyFormatHelper().ptr); va_end(ap); } } @@ -1430,16 +1430,16 @@ private: BitArray accessiblePackages, privateAccessiblePackages;// whitelists of accessible (imported) packages public: - final extern (D) this() nothrow + final extern (D) this() nothrow @safe { } - final extern (D) this(Identifier ident) nothrow + final extern (D) this(Identifier ident) nothrow @safe { super(ident); } - final extern (D) this(const ref Loc loc, Identifier ident) nothrow + final extern (D) this(const ref Loc loc, Identifier ident) nothrow @safe { super(loc, ident); } @@ -1919,7 +1919,7 @@ extern (C++) final class WithScopeSymbol : ScopeDsymbol { WithStatement withstate; - extern (D) this(WithStatement withstate) nothrow + extern (D) this(WithStatement withstate) nothrow @safe { this.withstate = withstate; } @@ -1979,7 +1979,7 @@ extern (C++) final class ArrayScopeSymbol : ScopeDsymbol private RootObject arrayContent; Scope* sc; - extern (D) this(Scope* sc, Expression exp) nothrow + extern (D) this(Scope* sc, Expression exp) nothrow @safe { super(exp.loc, null); assert(exp.op == EXP.index || exp.op == EXP.slice || exp.op == EXP.array); @@ -1987,13 +1987,13 @@ extern (C++) final class ArrayScopeSymbol : ScopeDsymbol this.arrayContent = exp; } - extern (D) this(Scope* sc, TypeTuple type) nothrow + extern (D) this(Scope* sc, TypeTuple type) nothrow @safe { this.sc = sc; this.arrayContent = type; } - extern (D) this(Scope* sc, TupleDeclaration td) nothrow + extern (D) this(Scope* sc, TupleDeclaration td) nothrow @safe { this.sc = sc; this.arrayContent = td; @@ -2242,7 +2242,7 @@ extern (C++) final class OverloadSet : Dsymbol */ extern (C++) final class ForwardingScopeDsymbol : ScopeDsymbol { - extern (D) this() nothrow + extern (D) this() nothrow @safe { super(); } @@ -2328,7 +2328,7 @@ extern (C++) final class ForwardingScopeDsymbol : ScopeDsymbol extern (C++) final class ExpressionDsymbol : Dsymbol { Expression exp; - this(Expression exp) nothrow + this(Expression exp) nothrow @safe { super(); this.exp = exp; @@ -2353,7 +2353,7 @@ extern (C++) final class AliasAssign : Dsymbol Dsymbol aliassym; /// replace previous RHS of AliasDeclaration with `aliassym` /// only one of type and aliassym can be != null - extern (D) this(const ref Loc loc, Identifier ident, Type type, Dsymbol aliassym) nothrow + extern (D) this(const ref Loc loc, Identifier ident, Type type, Dsymbol aliassym) nothrow @safe { super(loc, null); this.ident = ident; |