Skip to content

fix #21033: Add template _d_newarrayUTrace - #21525

Merged
thewilsonator merged 1 commit into
dlang:stablefrom
teodutu:fix-21033
Jul 12, 2025
Merged

thewilsonator merged 1 commit into
dlang:stablefrom
teodutu:fix-21033

Conversation

@teodutu

@teodutu teodutu commented Jul 11, 2025

Copy link
Copy Markdown
Member

PR #15299 added the template _d_newarrayU, but not its corresponding trace-GC hook. This commit adds the latter as a wrapper on top of _d_newarrayUPureNothrow so _d_newarrayUTrace can be called from such contexts

@dlang-bot

Copy link
Copy Markdown

Thanks for your pull request, @teodutu!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

  • In preparation for migrating from Bugzilla to GitHub Issues, the issue reference syntax has changed. Please add the word "Bugzilla" to issue references. For example, Fix Bugzilla Issue 12345 or Fix Bugzilla 12345.(Reminder: the edit needs to be done in the Git commit message, not the GitHub pull request.)

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + dmd#21525"

@teodutu teodutu changed the title Fix #21033: Add template _d_newarrayUTrace fix #21033: Add template _d_newarrayUTrace Jul 11, 2025
@teodutu
teodutu force-pushed the fix-21033 branch 2 times, most recently from b1f74e7 to 364a3e9 Compare July 11, 2025 15:58
PR dlang#15299 added the template `_d_newarrayU`, but not its corresponding
trace-GC hook `_d_newarrayUTrace`. This commit adds the latter as a wrapper
on top of `_d_newarrayUPureNothrow` so `_d_newarrayUTrace` can be called
from such contexts.

Signed-off-by: Teodor Dutu <[email protected]>
Comment thread compiler/src/dmd/id.d
Comment on lines +281 to +282
{ "_d_newarrayU" },
{ "_d_newarrayUTrace" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should make sure that id.h is up to date too

teodutu added a commit to teodutu/phobos that referenced this pull request Jul 12, 2025
dlang/dmd#21525 Adds the template `_d_newarrayUTrace`.
To fix dlang/dmd#21033, this commit needs to replace the use of the
non-template hook with the newly added template in `std.array.d`.

Signed-off-by: Teodor Dutu <[email protected]>
@thewilsonator
thewilsonator merged commit a18f759 into dlang:stable Jul 12, 2025
teodutu added a commit to teodutu/phobos that referenced this pull request Jul 12, 2025
dlang/dmd#21525 Adds the template `_d_newarrayUTrace`.
To fix dlang/dmd#21033, this commit needs to replace the use of the
non-template hook with the newly added template in `std.array.d`.

Signed-off-by: Teodor Dutu <[email protected]>
teodutu added a commit to teodutu/phobos that referenced this pull request Jul 12, 2025
dlang/dmd#21525 Adds the template `_d_newarrayUTrace`.
To fix dlang/dmd#21033, this commit needs to replace the use of the
non-template hook with the newly added template in `std.array.d`.

Signed-off-by: Teodor Dutu <[email protected]>
thewilsonator pushed a commit to dlang/phobos that referenced this pull request Jul 21, 2025
dlang/dmd#21525 Adds the template `_d_newarrayUTrace`.
To fix dlang/dmd#21033, this commit needs to replace the use of the
non-template hook with the newly added template in `std.array.d`.

Signed-off-by: Teodor Dutu <[email protected]>
@dkorpel dkorpel mentioned this pull request Dec 12, 2025
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.

3 participants