diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2022-06-13 10:41:57 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2022-06-13 11:38:10 +0200 |
commit | ec486b739b83ffdbe40c5ececb20d16c94d6b0d0 (patch) | |
tree | 9a3c04628df45a6dca9288e2c44b089c957e426d /libphobos/src | |
parent | 13ea4a6e830da1f245136601e636dec62e74d1a7 (diff) | |
download | gcc-ec486b739b83ffdbe40c5ececb20d16c94d6b0d0.zip gcc-ec486b739b83ffdbe40c5ececb20d16c94d6b0d0.tar.gz gcc-ec486b739b83ffdbe40c5ececb20d16c94d6b0d0.tar.bz2 |
d: Merge upstream dmd 821ed393d, druntime 454471d8, phobos 1206fc94f.
D front-end changes:
- Import latest bug fixes to mainline.
D runtime changes:
- Fix duplicate Elf64_Dyn definitions on Solaris.
- _d_newThrowable has been converted to a template.
Phobos changes:
- Import latest bug fixes to mainline.
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 821ed393d.
* expr.cc (ExprVisitor::visit (NewExp *)): Remove handled of
allocating `@nogc' throwable object.
* runtime.def (NEWTHROW): Remove.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime 454471d8.
* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add
core/sync/package.d.
* libdruntime/Makefile.in: Regenerate.
* src/MERGE: Merge upstream phobos 1206fc94f.
Diffstat (limited to 'libphobos/src')
-rw-r--r-- | libphobos/src/MERGE | 2 | ||||
-rw-r--r-- | libphobos/src/std/mmfile.d | 10 | ||||
-rw-r--r-- | libphobos/src/std/sumtype.d | 22 |
3 files changed, 13 insertions, 21 deletions
diff --git a/libphobos/src/MERGE b/libphobos/src/MERGE index ddf730e..30e9e80 100644 --- a/libphobos/src/MERGE +++ b/libphobos/src/MERGE @@ -1,4 +1,4 @@ -d46814c86392007ebb4fb73cb684ef9e8caa605a +1206fc94f967b0183667a109049cbf596deaa696 The first line of this file holds the git revision number of the last merge done from the dlang/phobos repository. diff --git a/libphobos/src/std/mmfile.d b/libphobos/src/std/mmfile.d index e4000d4..f8f8a90 100644 --- a/libphobos/src/std/mmfile.d +++ b/libphobos/src/std/mmfile.d @@ -71,13 +71,13 @@ class MmFile * - On POSIX, $(REF ErrnoException, std, exception). * - On Windows, $(REF WindowsException, std, windows, syserror). */ - this(string filename) + this(string filename) scope { this(filename, Mode.read, 0, null); } version (linux) this(File file, Mode mode = Mode.read, ulong size = 0, - void* address = null, size_t window = 0) + void* address = null, size_t window = 0) scope { // Save a copy of the File to make sure the fd stays open. this.file = file; @@ -85,7 +85,7 @@ class MmFile } version (linux) private this(int fildes, Mode mode, ulong size, - void* address, size_t window) + void* address, size_t window) scope { int oflag; int fmode; @@ -169,7 +169,7 @@ class MmFile * - On Windows, $(REF WindowsException, std, windows, syserror). */ this(string filename, Mode mode, ulong size, void* address, - size_t window = 0) + size_t window = 0) scope { this.filename = filename; this.mMode = mode; @@ -364,7 +364,7 @@ class MmFile /** * Flushes pending output and closes the memory mapped file. */ - ~this() + ~this() scope { debug (MMFILE) printf("MmFile.~this()\n"); unmap(); diff --git a/libphobos/src/std/sumtype.d b/libphobos/src/std/sumtype.d index 869c36f..f3d3152 100644 --- a/libphobos/src/std/sumtype.d +++ b/libphobos/src/std/sumtype.d @@ -1313,6 +1313,7 @@ version (D_BetterC) {} else // Types with invariants // Disabled in BetterC due to use of exceptions version (D_BetterC) {} else +version (D_Invariants) @system unittest { import std.exception : assertThrown; @@ -1330,22 +1331,13 @@ version (D_BetterC) {} else invariant { assert(i >= 0); } } - // Only run test if contract checking is enabled - try - { - S probe = S(-1); - assert(&probe); - } - catch (AssertError _) - { - SumType!S x; - x.match!((ref v) { v.i = -1; }); - assertThrown!AssertError(assert(&x)); + SumType!S x; + x.match!((ref v) { v.i = -1; }); + assertThrown!AssertError(assert(&x)); - SumType!C y = new C(); - y.match!((ref v) { v.i = -1; }); - assertThrown!AssertError(assert(&y)); - } + SumType!C y = new C(); + y.match!((ref v) { v.i = -1; }); + assertThrown!AssertError(assert(&y)); } // Calls value postblit on self-assignment |