aboutsummaryrefslogtreecommitdiff
path: root/libphobos/libdruntime
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2024-01-17 23:49:05 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2024-02-03 00:16:55 +0100
commit5470a9b176c2b3030ff3891c7e9403db2b0685b8 (patch)
tree6f8227718a03c22ea6a2ca1a78b7c8c18838c3c4 /libphobos/libdruntime
parent838e706fa55b1798fb5f0242dbd90cd4d9817bbe (diff)
downloadgcc-5470a9b176c2b3030ff3891c7e9403db2b0685b8.zip
gcc-5470a9b176c2b3030ff3891c7e9403db2b0685b8.tar.gz
gcc-5470a9b176c2b3030ff3891c7e9403db2b0685b8.tar.bz2
d: Merge dmd, druntime d8e3976a58, phobos 7a6e95688
D front-end changes: - Import dmd v2.107.0-beta.1. - A string literal as an assert condition is deprecated. - Added `@standalone` for module constructors. D runtime changes: - Import druntime v2.107.0-beta.1. Phobos changes: - Import phobos v2.107.0-beta.1. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd d8e3976a58. * dmd/VERSION: Bump version to v2.107.0-beta.1. * d-lang.cc (d_parse_file): Update for new front-end interface. * modules.cc (struct module_info): Add standalonectors. (build_module_tree): Implement @standalone. (register_module_decl): Likewise. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime d8e3976a58. * src/MERGE: Merge upstream phobos 7a6e95688.
Diffstat (limited to 'libphobos/libdruntime')
-rw-r--r--libphobos/libdruntime/MERGE2
-rw-r--r--libphobos/libdruntime/__builtins.di4
-rw-r--r--libphobos/libdruntime/core/attribute.d12
-rw-r--r--libphobos/libdruntime/core/math.d9
-rw-r--r--libphobos/libdruntime/core/stdcpp/new_.d4
-rw-r--r--libphobos/libdruntime/core/sys/posix/net/if_.d17
-rw-r--r--libphobos/libdruntime/rt/sections.d5
7 files changed, 41 insertions, 12 deletions
diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE
index fa7004b..2b4400f 100644
--- a/libphobos/libdruntime/MERGE
+++ b/libphobos/libdruntime/MERGE
@@ -1,4 +1,4 @@
-f1a045928e03239b9477f9497f43f2cf0e61e959
+d8e3976a58d6aef7c2c9371028a2ca4460b5b2ce
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/__builtins.di b/libphobos/libdruntime/__builtins.di
index 74147a0..b4fef09 100644
--- a/libphobos/libdruntime/__builtins.di
+++ b/libphobos/libdruntime/__builtins.di
@@ -53,6 +53,10 @@ version (CRuntime_Microsoft)
version (DigitalMars)
{
+ immutable float __nan = float.nan;
+
+ float __builtin_nanf()(char*) { return float.nan; }
+
double __builtin_inf()() { return double.infinity; }
float __builtin_inff()() { return float.infinity; }
real __builtin_infl()() { return real.infinity; }
diff --git a/libphobos/libdruntime/core/attribute.d b/libphobos/libdruntime/core/attribute.d
index c2a7c33..79ad25a 100644
--- a/libphobos/libdruntime/core/attribute.d
+++ b/libphobos/libdruntime/core/attribute.d
@@ -290,3 +290,15 @@ version (UdaGNUAbiTag) struct gnuAbiTag
* ---
*/
enum mustuse;
+
+/**
+ * Use this attribute to indicate that a shared module constructor does not depend on any
+ * other module constructor being run first. This avoids errors on cyclic module constructors.
+ *
+ * However, it is now up to the user to enforce safety.
+ * The module constructor must be marked `@system` as a result.
+ * Prefer to refactor the module constructor causing the cycle so it's in its own module if possible.
+ *
+ * This is only allowed on `shared` static constructors, not thread-local module constructors.
+ */
+enum standalone;
diff --git a/libphobos/libdruntime/core/math.d b/libphobos/libdruntime/core/math.d
index 30fc130..941b5de 100644
--- a/libphobos/libdruntime/core/math.d
+++ b/libphobos/libdruntime/core/math.d
@@ -30,15 +30,6 @@ public:
nothrow:
@safe:
-/*****************************************
- * Returns x rounded to a long value using the FE_TONEAREST rounding mode.
- * If the integer value of x is
- * greater than long.max, the result is
- * indeterminate.
- */
-deprecated("rndtonl is to be removed by 2.100. Please use round instead")
-extern (C) real rndtonl(real x);
-
pure:
/***********************************
* Returns cosine of x. x is in radians.
diff --git a/libphobos/libdruntime/core/stdcpp/new_.d b/libphobos/libdruntime/core/stdcpp/new_.d
index 6a598ba..de9e10a 100644
--- a/libphobos/libdruntime/core/stdcpp/new_.d
+++ b/libphobos/libdruntime/core/stdcpp/new_.d
@@ -59,6 +59,8 @@ T cpp_new(T, Args...)(auto ref Args args) if (is(T == class))
///
void cpp_delete(T)(T* ptr) if (!is(T == class))
{
+ if (ptr is null)
+ return;
destroy!false(*ptr);
__cpp_delete(ptr);
}
@@ -66,6 +68,8 @@ void cpp_delete(T)(T* ptr) if (!is(T == class))
///
void cpp_delete(T)(T instance) if (is(T == class))
{
+ if (instance is null)
+ return;
destroy!false(instance);
__cpp_delete(cast(void*) instance);
}
diff --git a/libphobos/libdruntime/core/sys/posix/net/if_.d b/libphobos/libdruntime/core/sys/posix/net/if_.d
index e63af4f..7fadcd8 100644
--- a/libphobos/libdruntime/core/sys/posix/net/if_.d
+++ b/libphobos/libdruntime/core/sys/posix/net/if_.d
@@ -143,6 +143,21 @@ else version (CRuntime_Bionic)
uint if_nametoindex(const scope char*);
char* if_indextoname(uint, char*);
}
+else version (CRuntime_Musl)
+{
+ struct if_nameindex_t
+ {
+ uint if_index;
+ char* if_name;
+ }
+
+ enum IF_NAMESIZE = 16;
+
+ uint if_nametoindex(const scope char*);
+ char* if_indextoname(uint, char*);
+ if_nameindex_t* if_nameindex();
+ void if_freenameindex(if_nameindex_t*);
+}
else version (CRuntime_UClibc)
{
struct if_nameindex_t
@@ -157,4 +172,4 @@ else version (CRuntime_UClibc)
char* if_indextoname(uint, char*);
if_nameindex_t* if_nameindex();
void if_freenameindex(if_nameindex_t*);
-} \ No newline at end of file
+}
diff --git a/libphobos/libdruntime/rt/sections.d b/libphobos/libdruntime/rt/sections.d
index 006d48d..65f5789 100644
--- a/libphobos/libdruntime/rt/sections.d
+++ b/libphobos/libdruntime/rt/sections.d
@@ -85,7 +85,10 @@ static assert(is(typeof(&initTLSRanges) RT == return) &&
is(typeof(&finiTLSRanges) == void function(RT) nothrow @nogc) &&
is(typeof(&scanTLSRanges) == void function(RT, scope void delegate(void*, void*) nothrow) nothrow));
-version (Shared)
+version (Windows)
+{
+}
+else version (Shared)
{
static assert(is(typeof(&pinLoadedLibraries) == void* function() nothrow @nogc));
static assert(is(typeof(&unpinLoadedLibraries) == void function(void*) nothrow @nogc));