Skip to content

Merge upstream stable #4962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 123 commits into
base: master
Choose a base branch
from
Draft

Merge upstream stable #4962

wants to merge 123 commits into from

Conversation

kinke
Copy link
Member

@kinke kinke commented Jul 28, 2025

Master was merged into stable 2 weeks ago, so this is a 2nd bigger jump for v2.112.

schveiguy and others added 30 commits April 24, 2025 14:19
or terminating, to do necessary initialization or cleanup. Move blkcache
destruction to the the cleanup function from the conservative GC.
Because the GCC-style IASM parser uses the same routine as `mixin()`,
cascading errors that fly off the end of the tokens list result in not
very helpful "End Of File" errors.

Where the parser can control it, opt to stop doing any more parsing of
the asm tokens at the first error detected.  This doesn't help in cases
where there's issues in parsing primary expressions (`asm { (a[; }`),
but then again `mixin("(a[");` suffers from the same.
Handle the mix of colon and colonColon tokens in the GCC IASM parser
instead of the D and ImportC parsers.
Add hooks to the GC to manage thread lifetimes
It should fix running clang-cpp on linux x86_64.

This involves moving some linux+aarch64 fixes to linux+clang since
clang was the actual issue.

See-also: dlang/dmd#15320
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
It happens with both clang and gcc. Tested with ldc2

Part of the full error:
```
Error: undefined identifier `__Float32x4_t`
Error: undefined identifier `__Float64x2_t`
Error: undefined identifier `__SVFloat32_t`
Error: undefined identifier `__SVFloat64_t`
Error: undefined identifier `__SVBool_t`
/usr/include/bits/math-vector.h(162): Error: undefined identifier `__Float32x4_t`
__attribute__ ((__aarch64_vector_pcs__)) __f32x4_t _ZGVnN4vv_atan2f (__f32x4_t, __f32x4_t);
                                                                                          ^
/usr/include/bits/math-vector.h(162): Error: undefined identifier `__Float32x4_t`
__attribute__ ((__aarch64_vector_pcs__)) __f32x4_t _ZGVnN4vv_atan2f (__f32x4_t, __f32x4_t);
                                                                                          ^
/usr/include/bits/math-vector.h(162): Error: undefined identifier `__Float32x4_t`
__attribute__ ((__aarch64_vector_pcs__)) __f32x4_t _ZGVnN4vv_atan2f (__f32x4_t, __f32x4_t);
                                                                                          ^
/usr/include/bits/math-vector.h(163): Error: undefined identifier `__Float32x4_t`
__attribute__ ((__aarch64_vector_pcs__)) __f32x4_t _ZGVnN4v_acosf (__f32x4_t);
                                                                             ^
/usr/include/bits/math-vector.h(163): Error: undefined identifier `__Float32x4_t`
__attribute__ ((__aarch64_vector_pcs__)) __f32x4_t _ZGVnN4v_acosf (__f32x4_t);
                                                                             ^
```

Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Stay consistent with the rest of the preprocessor conditionals by
checking for __linux__ instead of linux. Additionally, the former also
works with -std=c11 whereas the latter only works with -std=gnu11.

Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
With -std=c11, on linux, alloca no longer comes from stdlib.h.

Also fix the URL bug number which never pointed to the right one.

Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Use existing `Unqual` and `__arrayAlloc` templates

Remove redundant array assignment

Update templatized `_d_arrayappendcTX`

Remove old `_d_arrayappendcTX` hook

Remove redundant variable

Replace `size_t` with `auto`

Fix slice passed to `gc_expandArrayUsed`

Avoid casting pointer retuned by `GC.malloc`

Remove `pure` attribute from `_d_arrayappendT`

Fix spacing for `version` statements

Add newline at EOF in `appending.d`

Remove explicit pure attribute from `_d_arrayappendcTX`

Remove implementations details from docs

Trim trailing whitespace

Fix spacing in if statements

Remove unnecessary casts

refactor: Replace `void*` with `T*`

Mark gc extern(C) functions as private

Add docs explaining the purpose of `@trusted` attribute

Fix newlines

Call `typeid` directly without storing the result

Add changelog file
missing bitfield support for hashing, this uses the original types and more space
Incl. supporting `__declspec(_Noreturn)` in ImportC, as apparently
used in Microsoft headers when running with `/std:c11`, e.g.:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\intrin.h(204): Error: extended-decl-modifier expected after `__declspec(`, saw `_Noreturn` instead
__declspec(_Noreturn) void __fastfail(unsigned int);
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
…folder 64, not to 64.obj (dlang/dmd!21401)

this avoids concurrently creating the same file multiple times
…in (dlang/dmd!21411)

Because the compiler can pass rvalues to ref parameters with preview=in,
it is confusing and potentially misleading to have it mention rvalues.
thewilsonator and others added 20 commits July 13, 2025 09:47
remove some now unused semantic symbols from the import list.
…dmd!21544)

set location info on return statement, not only on return expression
remove `dmodule.d` dependance of a few more `dsymbolsem.d` symbols.
* Mark array literals as `on-stack` to bypass `@nogc` analysis

* Update `fail_compilation` test output

After updating the memcmp-ability criteria, now dynamic array can also
be compared using `memcmp` if their element type is comparable bit by
bit.
….112

Conflicts:
	dmd/denum.d
	dmd/dsymbol.d
	dmd/enum.h
	dmd/func.d
	dmd/main.d
	dmd/mars.d
	runtime/druntime/src/core/checkedint.d
	tests/dmd/compilable/issue15574.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.