diff options
| author | Iain Buclaw <ibuclaw@gdcproject.org> | 2025-01-14 20:51:45 +0100 |
|---|---|---|
| committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2025-01-14 21:01:33 +0100 |
| commit | c8894b681143041205d41e02ede112cef082bf2f (patch) | |
| tree | 6f9723f0ec5c688110b7ea8175109a82de70b406 /libphobos/libdruntime | |
| parent | 5006b9d810b102d7360b503288a983fc6488c289 (diff) | |
d: Merge upstream dmd, druntime d6f693b46a, phobos 336bed6d8.
D front-end changes:
- Import latest fixes from dmd v2.110.0-rc.1.
D runtime changes:
- Import latest fixes from druntime v2.110.0-rc.1.
Phobos changes:
- Import latest fixes from phobos v2.110.0-rc.1.
Included in the merge are fixes for the following PRs:
PR d/118438
PR d/118448
PR d/118449
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd d6f693b46a.
* d-incpath.cc (add_import_paths): Update for new front-end interface.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime d6f693b46a.
* src/MERGE: Merge upstream phobos 336bed6d8.
* testsuite/libphobos.init_fini/custom_gc.d: Adjust test.
Diffstat (limited to 'libphobos/libdruntime')
| -rw-r--r-- | libphobos/libdruntime/MERGE | 2 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/builtins.d | 21 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/demangle.d | 11 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/internal/gc/os.d | 4 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/sys/posix/sys/socket.d | 9 |
5 files changed, 35 insertions, 12 deletions
diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE index b145d1bd659..33bb398c00d 100644 --- a/libphobos/libdruntime/MERGE +++ b/libphobos/libdruntime/MERGE @@ -1,4 +1,4 @@ -c7902293d7df9d02546562cb09fc8439004a70d1 +d6f693b46a1565172cac7a1438905141783a164f The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/libphobos/libdruntime/core/builtins.d b/libphobos/libdruntime/core/builtins.d index bc12759e9a1..4e0c6d4d622 100644 --- a/libphobos/libdruntime/core/builtins.d +++ b/libphobos/libdruntime/core/builtins.d @@ -94,6 +94,23 @@ else version (DigitalMars) /// Provide static branch and value hints for the LDC/GDC compilers. /// DMD ignores these hints. -pragma(inline, true) bool likely(bool b) { return !!expect(b, true); } +pragma(inline, true) bool likely()(bool b) { return !!expect(b, true); } /// ditto -pragma(inline, true) bool unlikely(bool b) { return !!expect(b, false); } +pragma(inline, true) bool unlikely()(bool b) { return !!expect(b, false); } + +/// +@nogc nothrow pure @safe unittest +{ + int x = 12; + + expect(x, 12); + + if (likely(x > 0)) + { + // ... + } + else if (unlikely(x == int.min)) + { + // ... + } +} diff --git a/libphobos/libdruntime/core/demangle.d b/libphobos/libdruntime/core/demangle.d index c9bde27da69..e7efc8c3ec9 100644 --- a/libphobos/libdruntime/core/demangle.d +++ b/libphobos/libdruntime/core/demangle.d @@ -1758,13 +1758,10 @@ pure @safe: if (parseMangledNameArg()) continue; - else - { - dst.len = l; - pos = p; - brp = b; - debug(trace) printf( "not a mangled name arg\n" ); - } + dst.len = l; + pos = p; + brp = b; + debug(trace) printf( "not a mangled name arg\n" ); } if ( isDigit( front ) && isDigit( peek( 1 ) ) ) { diff --git a/libphobos/libdruntime/core/internal/gc/os.d b/libphobos/libdruntime/core/internal/gc/os.d index bde90e95228..9142708a4a4 100644 --- a/libphobos/libdruntime/core/internal/gc/os.d +++ b/libphobos/libdruntime/core/internal/gc/os.d @@ -67,9 +67,9 @@ else version (Posix) while (waited_pid == -1 && errno == EINTR); if (waited_pid == 0) return ChildStatus.running; - else if (errno == ECHILD) + if (errno == ECHILD) return ChildStatus.done; // someone called posix.syswait - else if (waited_pid != pid || status != 0) + if (waited_pid != pid || status != 0) onForkError(); return ChildStatus.done; } diff --git a/libphobos/libdruntime/core/sys/posix/sys/socket.d b/libphobos/libdruntime/core/sys/posix/sys/socket.d index 7c6fab6315a..12824373d58 100644 --- a/libphobos/libdruntime/core/sys/posix/sys/socket.d +++ b/libphobos/libdruntime/core/sys/posix/sys/socket.d @@ -30,6 +30,7 @@ else version (WatchOS) version (ARM) version = ARM_Any; version (AArch64) version = ARM_Any; version (HPPA) version = HPPA_Any; +version (HPPA64) version = HPPA_Any; version (MIPS32) version = MIPS_Any; version (MIPS64) version = MIPS_Any; version (PPC) version = PPC_Any; @@ -317,6 +318,7 @@ version (linux) SO_RCVLOWAT = 0x1004, SO_RCVTIMEO = 0x1006, SO_REUSEADDR = 0x0004, + SO_REUSEPORT = 0x0200, SO_SNDBUF = 0x1001, SO_SNDLOWAT = 0x1003, SO_SNDTIMEO = 0x1005, @@ -351,6 +353,7 @@ version (linux) SO_RCVLOWAT = 0x1004, SO_RCVTIMEO = 0x1006, SO_REUSEADDR = 0x0004, + SO_REUSEPORT = 0x0200, SO_SNDBUF = 0x1001, SO_SNDLOWAT = 0x1003, SO_SNDTIMEO = 0x1005, @@ -385,6 +388,7 @@ version (linux) SO_RCVLOWAT = 16, SO_RCVTIMEO = 18, SO_REUSEADDR = 2, + SO_REUSEPORT = 15, SO_SNDBUF = 7, SO_SNDLOWAT = 17, SO_SNDTIMEO = 19, @@ -454,6 +458,7 @@ version (linux) SO_RCVLOWAT = 18, SO_RCVTIMEO = 20, SO_REUSEADDR = 2, + SO_REUSEPORT = 15, SO_SNDBUF = 7, SO_SNDLOWAT = 19, SO_SNDTIMEO = 21, @@ -488,6 +493,7 @@ version (linux) SO_RCVLOWAT = 18, SO_RCVTIMEO = 20, SO_REUSEADDR = 2, + SO_REUSEPORT = 0x0200, //FIXME: the rest appear to be wrong SO_SNDBUF = 7, SO_SNDLOWAT = 19, SO_SNDTIMEO = 21, @@ -522,6 +528,7 @@ version (linux) SO_RCVLOWAT = 18, SO_RCVTIMEO = 20, SO_REUSEADDR = 2, + SO_REUSEPORT = 15, SO_SNDBUF = 7, SO_SNDLOWAT = 19, SO_SNDTIMEO = 21, @@ -556,6 +563,7 @@ version (linux) SO_RCVLOWAT = 18, SO_RCVTIMEO = 20, SO_REUSEADDR = 2, + SO_REUSEPORT = 15, SO_SNDBUF = 7, SO_SNDLOWAT = 19, SO_SNDTIMEO = 21, @@ -1547,6 +1555,7 @@ else version (Solaris) SO_RCVLOWAT = 0x1004, SO_RCVTIMEO = 0x1006, SO_REUSEADDR = 0x0004, + SO_REUSEPORT = 0x100e, SO_SNDBUF = 0x1001, SO_SNDLOWAT = 0x1003, SO_SNDTIMEO = 0x1005, |
