diff options
| author | Iain Buclaw <ibuclaw@gdcproject.org> | 2025-01-06 22:12:03 +0100 |
|---|---|---|
| committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2025-01-10 23:40:53 +0100 |
| commit | a7ae0c31245a7db7abf2e80d0016510afe9c8ad0 (patch) | |
| tree | 8668f3071f30b2d55e83e1785757dffb14829552 /libphobos/libdruntime | |
| parent | 086031c058598512d09bf898e4db3735b3e1f22c (diff) | |
d: Merge dmd, druntime 6884b433d2, phobos 48d581a1f
D front-end changes:
- It's now deprecated to declare `auto ref' parameters without
putting those two keywords next to each other.
- An error is now given for case fallthough for multivalued
cases.
- An error is now given for constructors with field destructors
with stricter attributes.
- An error is now issued for `in'/`out' contracts of `nothrow'
functions that may throw.
- `auto ref' can now be applied to local, static, extern, and
global variables.
D runtime changes:
- Import latest fixes from druntime v2.110.0-beta.1.
Phobos changes:
- Import latest fixes from phobos v2.110.0-beta.1.
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 6884b433d2.
* d-builtins.cc (build_frontend_type): Update for new front-end
interface.
(d_build_builtins_module): Likewise.
(matches_builtin_type): Likewise.
(covariant_with_builtin_type_p): Likewise.
* d-codegen.cc (lower_struct_comparison): Likewise.
(call_side_effect_free_p): Likewise.
* d-compiler.cc (Compiler::paintAsType): Likewise.
* d-convert.cc (convert_expr): Likewise.
(convert_for_assignment): Likewise.
* d-target.cc (Target::isVectorTypeSupported): Likewise.
(Target::isVectorOpSupported): Likewise.
(Target::isReturnOnStack): Likewise.
* decl.cc (get_symbol_decl): Likewise.
* expr.cc (build_return_dtor): Likewise.
* imports.cc (class ImportVisitor): Likewise.
* toir.cc (class IRVisitor): Likewise.
* types.cc (class TypeVisitor): Likewise.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime 6884b433d2.
* src/MERGE: Merge upstream phobos 48d581a1f.
Diffstat (limited to 'libphobos/libdruntime')
| -rw-r--r-- | libphobos/libdruntime/MERGE | 2 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/attribute.d | 3 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/lifetime.d | 2 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/stdcpp/allocator.d | 3 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/sys/freebsd/unistd.d | 2 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/sys/linux/unistd.d | 4 | ||||
| -rw-r--r-- | libphobos/libdruntime/core/sys/openbsd/unistd.d | 2 |
7 files changed, 15 insertions, 3 deletions
diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE index a6072c4570d..654fbed86d8 100644 --- a/libphobos/libdruntime/MERGE +++ b/libphobos/libdruntime/MERGE @@ -1,4 +1,4 @@ -34875cd6e1faa42e84ae953c0485ef524fe67e38 +6884b433d21d9b6356e5c83ffc6eb06a62a5cad1 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/attribute.d b/libphobos/libdruntime/core/attribute.d index 95a67ea219d..2b35b8d7c0e 100644 --- a/libphobos/libdruntime/core/attribute.d +++ b/libphobos/libdruntime/core/attribute.d @@ -13,6 +13,9 @@ * Makes an Objective-C interface method optional.) * $(TROW $(LREF selector), Objective-C, * Attaches an Objective-C selector to a method.) + * $(TROW $(LREF standalone),, + * Marks a shared module constructor as not depending on any + * other module constructor being run first.) * $(TROW $(LREF weak),, * Specifies that a global symbol should be emitted with weak linkage.) * ) diff --git a/libphobos/libdruntime/core/lifetime.d b/libphobos/libdruntime/core/lifetime.d index f3dab3624ac..7010d2ad3b0 100644 --- a/libphobos/libdruntime/core/lifetime.d +++ b/libphobos/libdruntime/core/lifetime.d @@ -1699,7 +1699,7 @@ template forward(args...) { x_ = forward!x; } - this()(auto const ref X x) + this()(auto ref const X x) { x_ = forward!x; } diff --git a/libphobos/libdruntime/core/stdcpp/allocator.d b/libphobos/libdruntime/core/stdcpp/allocator.d index a574cd39e8b..872f5975e1e 100644 --- a/libphobos/libdruntime/core/stdcpp/allocator.d +++ b/libphobos/libdruntime/core/stdcpp/allocator.d @@ -299,9 +299,10 @@ version (CppRuntime_Microsoft) { enum size_t _Big_allocation_threshold = 4096; enum size_t _Big_allocation_alignment = 32; + enum isPowerOf2(size_t v) = v && !(v & (v - 1)); static assert(2 * (void*).sizeof <= _Big_allocation_alignment, "Big allocation alignment should at least match vector register alignment"); - static assert((v => v != 0 && (v & (v - 1)) == 0)(_Big_allocation_alignment), "Big allocation alignment must be a power of two"); + static assert(isPowerOf2!_Big_allocation_alignment, "Big allocation alignment must be a power of two"); static assert(size_t.sizeof == (void*).sizeof, "uintptr_t is not the same size as size_t"); // NOTE: this must track `_DEBUG` macro used in C++... diff --git a/libphobos/libdruntime/core/sys/freebsd/unistd.d b/libphobos/libdruntime/core/sys/freebsd/unistd.d index 493cda1c8c9..ebb7afa2726 100644 --- a/libphobos/libdruntime/core/sys/freebsd/unistd.d +++ b/libphobos/libdruntime/core/sys/freebsd/unistd.d @@ -17,3 +17,5 @@ extern(C): nothrow: int getosreldate() pure @trusted; + +void closefrom(int); diff --git a/libphobos/libdruntime/core/sys/linux/unistd.d b/libphobos/libdruntime/core/sys/linux/unistd.d index faa226cf407..548870268db 100644 --- a/libphobos/libdruntime/core/sys/linux/unistd.d +++ b/libphobos/libdruntime/core/sys/linux/unistd.d @@ -5,6 +5,7 @@ public import core.sys.posix.unistd; version (linux): extern(C): nothrow: +@nogc: // Additional seek constants for sparse file handling // from Linux's unistd.h, stdio.h, and linux/fs.h @@ -21,3 +22,6 @@ char* getpass(const(char)* prompt); // Exit all threads in a process void exit_group(int status); + +/// Close all open file descriptors greater or equal to `lowfd` +void closefrom(int lowfd); diff --git a/libphobos/libdruntime/core/sys/openbsd/unistd.d b/libphobos/libdruntime/core/sys/openbsd/unistd.d index 4232c036049..9618543d8da 100644 --- a/libphobos/libdruntime/core/sys/openbsd/unistd.d +++ b/libphobos/libdruntime/core/sys/openbsd/unistd.d @@ -19,3 +19,5 @@ int getthrname(pid_t, char*, size_t); int pledge(const scope char*, const scope char*); int setthrname(pid_t, const scope char*); int unveil(const scope char*, const scope char*); + +int closefrom(int); |
