Skip to content
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

Upgrade frontend & libs to v2.102.1 #4323

Merged
merged 185 commits into from
Feb 26, 2023
Merged

Conversation

kinke
Copy link
Member

@kinke kinke commented Feb 12, 2023

No description provided.

WalterBright and others added 30 commits October 11, 2022 22:32
* Remove global `@system:`  annotations from C headers

* Implement DIP1035 - system variables
Having source file decoding in part of parse is a bit of a stretch: Module should not care
where the source file comes from, only that it is fed valid code.
For example, when using DMD as a library, one might want to directly provide 'string'
to Module, hence the coupling with ubyte[] is hindering this.
Splitting this code in its own function is a step towards removing the coupling,
and eventually moving this closer to file-handling routines rather than parsing routines.
merge stable

Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
That behavior was introduced when `in` was equivalent to `const`,
which is no longer the case and will cause issues when `in` enforces `scope`.
…ng/dmd!14562)

* Fix issue 22306 - scope array variable should be stack allocated

* Update changelog/scope-array-on-stack.dd

Co-authored-by: Max Haughton <maxhaton@gmail.com>

Co-authored-by: Max Haughton <maxhaton@gmail.com>
… assignment

Fix issue 13060.

Signed-off-by: Luís Ferreira <contact@lsferreira.net>
* test

* add integer vector comparisons
…ution failure

Show expression, not just identifier.
Show candidates.
kinke and others added 2 commits February 21, 2023 00:10
…xceptions from finalizers

A v2.102 regression, which newly enabled `StackTrace` constructions
from within GC finalizers. The construction is `@nogc`, but
apparently depends on the `typeid(StackTrace)` monitor having been
allocated already, i.e., a previous `StackTrace` construction.

So pre-allocate a dedicated mutex in the module constructor to
make the `StackTrace` construction really `@nogc`.
`druntime/test/allocations/src/alloc_from_assert.d` then passes on
Windows again (not tested by DMD, but by LDC).

While at it, also prevent `InvalidMemoryOperation` errors when trying
to print exceptions within finalizers - by not resolving anything
(=> empty printed trace), as resolving currently heavily depends on
the GC.
… to a link-time address (dlang/dmd!14657)

* Fix issue 23514 - Incorrect compilation when adding a 64-bit constant to a link-time address

The current cast to int causes a loss of precision, which can result in
incorrect compilation.

* Add test23514.d

* Enable optimization in test

* Improve test case

* Use ulong instead of size_t

* Restrict test to 64-bit targets

* Re-enable test for 32-bit targets

* Disable test for win64 and add comment
@kinke
Copy link
Member Author

kinke commented Feb 21, 2023

Alright, just 2 remaining dmd-testsuite failures on FreeBSD, with enabled optimizations only: runnable/test{17559,19086}.d (related to exception stacktraces apparently)

@kinke
Copy link
Member Author

kinke commented Feb 22, 2023

Oh and looks like the macOS-arm64 CI jobs don't hang anymore for some druntime integration test. :)

kinke and others added 3 commits February 22, 2023 11:17
…hrowing exceptions from finalizers (dlang/dmd!14901)

* Fix Issue 23731 - InvalidMemoryOperation error on Windows when throwing exceptions from finalizers

A v2.102 regression, which newly enabled `StackTrace` constructions
from within GC finalizers. The construction is `@nogc`, but
apparently depends on the `typeid(StackTrace)` monitor having been
allocated already, i.e., a previous `StackTrace` construction.

So pre-allocate a dedicated `Mutex` in the module constructor to
make the `StackTrace` construction really `@nogc`.
`druntime/test/allocations/src/alloc_from_assert.d` then passes on
Windows again (not tested by DMD, but by LDC).

While at it, also prevent `InvalidMemoryOperation` errors when trying
to print exceptions within finalizers - by not resolving anything
(=> empty printed trace), as resolving currently heavily depends on
the GC.

* [work around cyclic modules dependency...]

* druntime: Test test/allocations/src/alloc_from_assert.d on Windows too

As it regressed with v2.102.
@kinke kinke force-pushed the merge-2.102 branch 5 times, most recently from e060df4 to 19b56e7 Compare February 23, 2023 16:20
These 2 tests regressed with v2.102 with enabled optimizations; the
tests themselves are unchanged. I guess some druntime change broke
them, but doubt the tests were ever really robust with FreeBSD's
libexecinfo, which doesn't seem to cope well with elided frame
pointers at all - at least with CI-tested FreeBSD 12.
@kinke kinke marked this pull request as ready for review February 23, 2023 20:05
@kinke kinke changed the title Draft: Upgrade frontend & libs to v2.102.1 Upgrade frontend & libs to v2.102.1 Feb 24, 2023
This is important for CTFE-string-appending etc. for targets without
proper druntime support, such as WebAssembly.

See ldc-developers#4324 for an examplary
breakage caused by the hook addition in D v2.101, rendering dub
totally unusable for such targets.

In particular, skip all the `-profile=gc` stuff when not using that
cmdline option.
kinke and others added 5 commits February 26, 2023 07:10
… `-profile=gc` (dlang/dmd!14914)

* druntime: Only define _d_arraysetlengthTTrace when compiling with -profile=gc

Analogous to dlang/dmd!14912, and covered by druntime/test/profile/src/profilegc.d
too.

* druntime: Guard more stuff behind `version (D_ProfileGC)`

Keeping the templated hooks lean.
@kinke kinke enabled auto-merge February 26, 2023 12:40
@kinke kinke merged commit 81e78a5 into ldc-developers:master Feb 26, 2023
@kinke kinke deleted the merge-2.102 branch February 26, 2023 14:42
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.

None yet