Commit graph

569 commits

Author SHA1 Message Date
Albert24GG
03c8f2723f
Templatize _d_arraysetcapacity hook (#21143) 2025-04-15 18:07:47 +08:00
Emily
b553068344
Changed author name to new one (#21217)
I have changed my name and would not like to have
anything public associated with my old name.

Signed-off-by: Emily <info@emy.sh>
2025-04-13 08:23:30 +08:00
Martin Kinkelin
ce6cef9762
Merge pull request #21202 from kinke/merge_stable
Merge stable
2025-04-12 13:04:54 +02:00
fossdd
81dd72b2a3
druntime: add support for musl RISCV64 (#21213)
Based on https://git.musl-libc.org/cgit/musl/tree/arch/riscv64/bits?h=v1.2.5
2025-04-12 18:01:30 +08:00
Martin Kinkelin
7d368925cc Merge remote-tracking branch 'origin/stable' 2025-04-12 11:55:36 +02:00
Sönke Ludwig
09ed02ce56
Fix segmentation fault on macOS 15.4 (#21176)
Strips off additional bits that are not part of the actual TLV key to avoid applications using DRuntime crashing during initialization.

Fixes #21126.
2025-04-12 11:53:18 +02:00
Martin Kinkelin
58d065f935 Merge remote-tracking branch 'origin/stable'
Conflicts:
	compiler/src/dmd/declaration.h
	compiler/src/dmd/frontend.h
	compiler/src/dmd/globals.h
	compiler/src/dmd/typesem.d
	compiler/src/tests/cxxfrontend.cc
	compiler/test/fail_compilation/fail347.d
2025-04-11 13:35:53 +02:00
drpriver
3070fc288a
ImportC: undefined identifier _Float16 (#21184)
Fixes: https://github.com/dlang/dmd/issues/21183

The previous MR put the macro in a `#if linux` which meant it
didn't actually solve the problem of being unable to
`#include <math.h>` on macos. So put it in a better spot.

Also enable the test that includes that header for macos so that
it stays solved.
2025-04-09 14:05:05 +08:00
Denis Feklushkin
21b6202f54
fix compilation of ucontext_t-based fibers (#21156) 2025-04-06 20:08:02 +08:00
Dennis
cfa763d301
Turn macro translations into template functions (#21108) 2025-03-29 06:31:49 +08:00
Martin Kinkelin
b390c7ec13 [druntime] core.int128: Add 64-bit mul() overload and optimize via inline asm on x86_64 2025-03-25 16:12:24 +08:00
Martin Kinkelin
6b7bbdd330 [druntime] core.int128: Optimize new udivmod overload via inline asm on x86_64 2025-03-24 14:43:17 +08:00
Martin Kinkelin
3a661c1f8c [druntime] core.int128: Extract nested udivmod128_64 as udivmod overload 2025-03-24 14:43:17 +08:00
Martin Kinkelin
ea4b1e9607 [druntime] core.int128: Don't support/test invalid shift-by values >= 128
This enables using (LLVM/gcc) intrinsics for shifts, for which such
inputs are undefined behavior, as for builtin types.
2025-03-24 14:43:17 +08:00
Dennis
649223bff5
Remove redundant GC allocation for _d_newarraymTX.dims (#21051) 2025-03-22 06:36:00 +08:00
Dennis
d5db322fce
Merge stable (#21048)
* bump VERSION to v2.110.0

* purge changelog

* bump VERSION to v2.111.0-beta.1

* Accept __rvalue attribute on ref functions; which will force the result to be treated as __rvalue. (#20946)

This is essential to implement `move`, `forward`, etc.

* memoryerror.d: Fix AnySupported version condition (#20983)

* Fix #20982 - wrong line number in iasmgcc (#20993)

* Move genCfunc to cxxfrontend (#20992)

* druntime: Fix compilation of rt.cover on Android (#21015)

* Expose SourceLoc to C++ interface (#20980)

* [stable] C++ header fixes for declaration, expression, and typinf (#21016)

Seen either from compilation errors or missing symbols at link time.

* C++ headers: Add 3 Declaration bitfield setters/getters required by LDC

* druntime: Add module declaration to rt.invariant, to prevent conflicts with user-provided invariant.d (#21017)

* Fix #21020 - Indexing a *cast* AA yields no lvalue anymore (#21029)

* Add C++23 to CppStdRevision enum (#21043)

* Improve UFCS/property error message (#21046)

---------

Co-authored-by: Manu Evans <turkeyman@gmail.com>
Co-authored-by: Martin Kinkelin <kinke@users.noreply.github.com>
Co-authored-by: Iain Buclaw <ibuclaw@gdcproject.org>
Co-authored-by: Martin Kinkelin <noone@nowhere.com>
2025-03-21 15:48:21 +01:00
Iain Buclaw
94950cae58
Add C++23 to CppStdRevision enum (#21043) 2025-03-21 08:29:14 +08:00
Martin Kinkelin
6d57da76e4
druntime: Add module declaration to rt.invariant, to prevent conflicts with user-provided invariant.d (#21017) 2025-03-18 07:42:46 +08:00
Martin Kinkelin
d2ee11364c
druntime: Fix compilation of rt.cover on Android (#21015) 2025-03-17 15:06:24 +01:00
Dennis
51be8bb729
memoryerror.d: Fix AnySupported version condition (#20983) 2025-03-14 07:13:44 +08:00
Albert24GG
9a8302a941
Fix #17481 - free ctors before returning (#20975) 2025-03-11 08:30:29 +08:00
Dennis
4661fec6b7
Update copyright years to 2025 (#20958) 2025-03-06 18:17:32 +08:00
Paul Backus
5fc114165d
Fix importc_compare test on Windows (#20922)
MSVC does not support C11 atomics, but it still provides a "stub"
version of stdatomic.h, which aborts compilation with an #error
directive when included.

To avoid this error, explicitly set the C standard to C11 when invoking
the C preprocessor on Windows, and check for the C11 macro
__STDC_NO_ATOMICS__ before including stdatomic.h.
2025-02-27 20:15:31 +01:00
Adam Wilson
a0581f2538 Fix deprecation message. 2025-02-23 16:58:46 -08:00
Adam Wilson
d1d6c60a12 Move ODBVER outside of deprecation block. 2025-02-23 16:32:28 -08:00
Adam Wilson
a9b688f2fd Fix deprecation message. 2025-02-23 16:20:53 -08:00
Adam Wilson
b76d185fa1 Fix deprecation message. 2025-02-23 16:03:26 -08:00
Adam Wilson
60d915b23d Deprecate the old ODBC 3.5 modules in core.sys.windows. 2025-02-23 15:46:01 -08:00
Steven Schveighoffer
60a3060cdf
Use Entry struct from TypeInfo_AssociativeArray instead of local one, (#20900)
just one less template and one less place to maintain.
2025-02-20 06:00:27 +08:00
Rainer
c4a9796472 add test case from #20853 2025-02-18 13:51:06 +01:00
Rainer
7d6fff7bcf Fix issue #17503 - Associative Arrays improperly register a GC-allocated TypeInfo for element cleanup
- let the compiler generate type info for the AA Entry and add it to TypeInfo_AssociativeArray
- strip modifiers for index and next in TypeInfo_AssociativeArray to make it agnostic to changes by the glue layer
2025-02-17 22:02:57 +01:00
Dennis
c0c1b0ab12
Use __FILE__, __LINE__ for templated tracegc hooks (#20882) 2025-02-17 11:53:16 +01:00
Dennis
0bb48e277c
Remove version (tracegc) blocks (#20881) 2025-02-17 07:15:00 +08:00
liushuyu
12e64881f2
druntime: redirect dual-ABI functions on glibc to IEEE128 version ... (#20826)
... if IEEE long double ABI is selected
2025-02-13 15:26:07 +08:00
Steven Schveighoffer
0542419acb
Remove knowledge of metadata storage from rt/lifetime and (#20833)
core/internal/array. All metadata management should be done by GC.
2025-02-09 16:46:34 +08:00
Steven Schveighoffer
935d72a79e Remove unnecessary NoPointersBitmapPayload template. 2025-02-08 03:52:29 +01:00
Steven Schveighoffer
6d6e170cf2
Fix race condition when alternative GC mechanisms are used to scan (#20820)
threads. The `thread_preSuspend` hook should return true when druntime
has knowledge of a thread. But it's based on `sm_this` (the storage for
`Thread.getThis`) being set. Because the thread lock is not taken to set
`sm_this`, a race exists when a thread is suspended between this
setting, and the adding to the thread list for scanning. Therefore,
`thread_preSuspend` can return true, but `thread_scanAll` will not
include that thread in the list of scannables.
2025-02-06 05:39:59 +08:00
Jonathan M Davis
6e249f01dd
Fix issue 20812: hasIndirections wrong when void has qualifiers. (#20813)
The current check that special cases static arrays of void doesn't take
type qualifiers into account - e.g. void[42] is treated as having
indirections, but const(void[42]) is not. This fixes that.
2025-02-03 13:18:29 +08:00
Martin Kinkelin
130e6aa1d4
GHA main: Add Alpine Linux job, to CI-test musl libc (#20741)
* GHA main: Add Alpine Linux job, to CI-test musl libc

Incl. some test fixes.

* [refactor common isDlcoseNoop logic and prepare for Darwin support]
2025-01-28 00:28:20 +01:00
Walter Bright
94714307ec
add __builtin__popcount() for ImportC (#20790) 2025-01-28 06:25:04 +08:00
Walter Bright
2ca7960029
implement cdpopcnt for AArch64 (#20787) 2025-01-27 22:33:15 +08:00
Elias Batek
af002fcad0
Port ntdef macros NT_INFORMATION, NT_WARNING and NT_ERROR (#20782) 2025-01-26 07:32:28 +08:00
Elias Batek
63630b4287
Mark NT_SUCCESS with various applicable attributes (#20781) 2025-01-26 05:53:22 +08:00
Elias Batek
b7e3b3b617
Add core.sys.windows.bcrypt to the build process (#20780) 2025-01-25 21:54:49 +01:00
IchorDev
32883d3994
Add Windows BCrypt bindings (#20740)
* Update sdkddkver/w32api bindings

* Add BCrypt bindings

---------

Co-authored-by: IchorDev <ichordev@noreply.git.sleeping.town>
2025-01-25 16:33:27 +01:00
Johan Engelen
047dfb5703
druntime: Upstream exception stack traces on musl platforms from LDC (#20758)
Based on:
* https://github.com/ldc-developers/ldc/pull/4639
* https://github.com/ldc-developers/ldc/pull/4691

Co-authored-by: Martin Kinkelin <noone@nowhere.com>
2025-01-23 15:44:45 +08:00
Jonas Meeuws
2ecfa63ce7
Use selective imports when importing from core.stdc in rt (#20742) 2025-01-20 21:12:30 +01:00
Jonas Meeuws
5a02544ea3
Use selective imports when importing from core.stdc in druntime tests (#20743) 2025-01-20 19:59:19 +01:00
Iain Buclaw
ad947b55a8 druntime: Add GNU_InlineAsm implementations 2025-01-19 15:46:27 +01:00
Iain Buclaw
3e50cd8f94 druntime: Update GNU implementation of callWithStackShell 2025-01-19 15:46:00 +01:00