diff options
| author | Iain Buclaw <ibuclaw@gdcproject.org> | 2024-03-03 20:28:58 +0100 |
|---|---|---|
| committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2024-03-03 23:42:56 +0100 |
| commit | bbfbaa792b50ebd75b383be25f50c92f30243256 (patch) | |
| tree | 745acbaba5cd3643e8e3ed9797a4ca258d2ae1d8 /libphobos/libdruntime | |
| parent | 24975a9195743e8eb4ca213f35b9221d4eeb6b59 (diff) | |
d: Merge upstream dmd, druntime f8bae04558, phobos ba2ade9dec
D front-end changes:
- Import dmd v2.108.1-beta-1.
D runtime changes:
- Import druntime v2.108.1-beta-1.
Phobos changes:
- Import phobos v2.108.1-beta-1.
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd f8bae04558.
* dmd/VERSION: Bump version to v2.108.0-beta.1.
* d-builtins.cc (build_frontend_type): Update for new front-end
interface.
* d-codegen.cc (build_assert_call): Likewise.
* d-convert.cc (d_array_convert): Likewise.
* decl.cc (get_vtable_decl): Likewise.
* expr.cc (ExprVisitor::visit (EqualExp *)): Likewise.
(ExprVisitor::visit (VarExp *)): Likewise.
(ExprVisitor::visit (ArrayLiteralExp *)): Likewise.
(ExprVisitor::visit (AssocArrayLiteralExp)): Likewise.
* intrinsics.cc (build_shuffle_mask_type): Likewise.
(maybe_warn_intrinsic_mismatch): Likewise.
* runtime.cc (get_libcall_type): Likewise.
* typeinfo.cc (TypeInfoVisitor::layout_string): Likewise.
(TypeInfoVisitor::visit(TypeInfoTupleDeclaration *)): Likewise.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime 02d6d07a69.
* src/MERGE: Merge upstream phobos a2ade9dec.
Diffstat (limited to 'libphobos/libdruntime')
| -rw-r--r-- | libphobos/libdruntime/MERGE | 2 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/exception.d | 13 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/sys/linux/ifaddrs.d | 11 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/sys/posix/sys/select.d | 44 |
4 files changed, 47 insertions, 23 deletions
diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE index f11c5fbfb0b..4c0a0bc2aac 100644 --- a/libphobos/libdruntime/MERGE +++ b/libphobos/libdruntime/MERGE @@ -1,4 +1,4 @@ -ceff48bf7db05503117f54fdc0cefcb89b711136 +f8bae0455851a1dfc8113d69323415f6de549e39 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/exception.d b/libphobos/libdruntime/core/exception.d index 959ce83f02e..c7b302c4520 100644 --- a/libphobos/libdruntime/core/exception.d +++ b/libphobos/libdruntime/core/exception.d @@ -19,6 +19,19 @@ void __switch_errorT()(string file = __FILE__, size_t line = __LINE__) @trusted assert(0, "No appropriate switch clause found"); } +/* + * Make sure template __switch_errorT is always instantiated when building + * druntime. This works around https://issues.dlang.org/show_bug.cgi?id=20802. + * When druntime and phobos are compiled with -release, the instance for + * __switch_errorT is not needed. An application compiled with -release + * could need the instance for __switch_errorT, but the compiler would + * not generate code for it, because it assumes, that it was already + * generated for druntime. Always including the instance in a compiled + * druntime allows to use an application without -release with druntime + * with -release. + */ +private alias dummy__switch_errorT = __switch_errorT!(); + /** * Thrown on a range error. */ diff --git a/libphobos/libdruntime/core/sys/linux/ifaddrs.d b/libphobos/libdruntime/core/sys/linux/ifaddrs.d index 479dfa8d39b..d8c52c148e5 100644 --- a/libphobos/libdruntime/core/sys/linux/ifaddrs.d +++ b/libphobos/libdruntime/core/sys/linux/ifaddrs.d @@ -39,11 +39,18 @@ struct ifaddrs union { /// Broadcast address of the interface - sockaddr* ifu_broadaddr; + sockaddr* ifa_broadaddr; + /// Point-to-point destination addresss - sockaddr* if_dstaddr; + sockaddr* ifa_dstaddr; } + deprecated("druntime declared this incorrectly before. The correct name is ifa_broadaddr.") + alias ifu_broadaddr = ifa_broadaddr; + + deprecated("druntime declared this incorrectly before. The correct name is ifa_dstaddr.") + alias if_dstaddr = ifa_dstaddr; + /// Address specific data void* ifa_data; } diff --git a/libphobos/libdruntime/core/sys/posix/sys/select.d b/libphobos/libdruntime/core/sys/posix/sys/select.d index dd05d08dde6..bd342503252 100644 --- a/libphobos/libdruntime/core/sys/posix/sys/select.d +++ b/libphobos/libdruntime/core/sys/posix/sys/select.d @@ -183,7 +183,8 @@ else version (FreeBSD) struct fd_set { - __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] __fds_bits; + __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] fds_bits; + deprecated("druntime incorrectly named fds_bits __fds_bits") alias __fds_bits = fds_bits; } extern (D) __fd_mask __fdset_mask(uint n) pure @@ -193,17 +194,17 @@ else version (FreeBSD) extern (D) void FD_CLR( int n, fd_set* p ) pure { - p.__fds_bits[n / _NFDBITS] &= ~__fdset_mask(n); + p.fds_bits[n / _NFDBITS] &= ~__fdset_mask(n); } extern (D) bool FD_ISSET( int n, const(fd_set)* p ) pure { - return (p.__fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0; + return (p.fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0; } extern (D) void FD_SET( int n, fd_set* p ) pure { - p.__fds_bits[n / _NFDBITS] |= __fdset_mask(n); + p.fds_bits[n / _NFDBITS] |= __fdset_mask(n); } extern (D) void FD_ZERO( fd_set* p ) pure @@ -214,7 +215,7 @@ else version (FreeBSD) _p = p; _n = (FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS; while (_n > 0) - _p.__fds_bits[--_n] = 0; + _p.fds_bits[--_n] = 0; } int pselect(int, fd_set*, fd_set*, fd_set*, const scope timespec*, const scope sigset_t*); @@ -232,7 +233,8 @@ else version (NetBSD) struct fd_set { - __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] __fds_bits; + __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] fds_bits; + deprecated("druntime incorrectly named fds_bits __fds_bits") alias __fds_bits = fds_bits; } extern (D) __fd_mask __fdset_mask(uint n) pure @@ -242,17 +244,17 @@ else version (NetBSD) extern (D) void FD_CLR( int n, fd_set* p ) pure { - p.__fds_bits[n / _NFDBITS] &= ~__fdset_mask(n); + p.fds_bits[n / _NFDBITS] &= ~__fdset_mask(n); } extern (D) bool FD_ISSET( int n, const(fd_set)* p ) pure { - return (p.__fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0; + return (p.fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0; } extern (D) void FD_SET( int n, fd_set* p ) pure { - p.__fds_bits[n / _NFDBITS] |= __fdset_mask(n); + p.fds_bits[n / _NFDBITS] |= __fdset_mask(n); } extern (D) void FD_ZERO( fd_set* p ) pure @@ -263,7 +265,7 @@ else version (NetBSD) _p = p; _n = (FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS; while (_n > 0) - _p.__fds_bits[--_n] = 0; + _p.fds_bits[--_n] = 0; } int pselect(int, fd_set*, fd_set*, fd_set*, const scope timespec*, const scope sigset_t*); @@ -281,7 +283,8 @@ else version (OpenBSD) struct fd_set { - __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] __fds_bits; + __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] fds_bits; + deprecated("druntime incorrectly named fds_bits __fds_bits") alias __fds_bits = fds_bits; } extern (D) __fd_mask __fdset_mask(uint n) pure @@ -291,17 +294,17 @@ else version (OpenBSD) extern (D) void FD_CLR(int n, fd_set* p) pure { - p.__fds_bits[n / _NFDBITS] &= ~__fdset_mask(n); + p.fds_bits[n / _NFDBITS] &= ~__fdset_mask(n); } extern (D) bool FD_ISSET(int n, const(fd_set)* p) pure { - return (p.__fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0; + return (p.fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0; } extern (D) void FD_SET(int n, fd_set* p) pure { - p.__fds_bits[n / _NFDBITS] |= __fdset_mask(n); + p.fds_bits[n / _NFDBITS] |= __fdset_mask(n); } extern (D) void FD_ZERO(fd_set* p) pure @@ -310,7 +313,7 @@ else version (OpenBSD) size_t _n = (FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS; while (_n > 0) - _p.__fds_bits[--_n] = 0; + _p.fds_bits[--_n] = 0; } int pselect(int, fd_set*, fd_set*, fd_set*, const scope timespec*, const scope sigset_t*); @@ -328,7 +331,8 @@ else version (DragonFlyBSD) struct fd_set { - __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] __fds_bits; + __fd_mask[(FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS] fds_bits; + deprecated("druntime incorrectly named fds_bits __fds_bits") alias __fds_bits = fds_bits; } extern (D) __fd_mask __fdset_mask(uint n) pure @@ -338,17 +342,17 @@ else version (DragonFlyBSD) extern (D) void FD_CLR( int n, fd_set* p ) pure { - p.__fds_bits[n / _NFDBITS] &= ~__fdset_mask(n); + p.fds_bits[n / _NFDBITS] &= ~__fdset_mask(n); } extern (D) bool FD_ISSET( int n, const(fd_set)* p ) pure { - return (p.__fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0; + return (p.fds_bits[n / _NFDBITS] & __fdset_mask(n)) != 0; } extern (D) void FD_SET( int n, fd_set* p ) pure { - p.__fds_bits[n / _NFDBITS] |= __fdset_mask(n); + p.fds_bits[n / _NFDBITS] |= __fdset_mask(n); } extern (D) void FD_ZERO( fd_set* p ) pure @@ -359,7 +363,7 @@ else version (DragonFlyBSD) _p = p; _n = (FD_SETSIZE + (_NFDBITS - 1)) / _NFDBITS; while (_n > 0) - _p.__fds_bits[--_n] = 0; + _p.fds_bits[--_n] = 0; } int pselect(int, fd_set*, fd_set*, fd_set*, const scope timespec*, const scope sigset_t*); |
