Skip to content

Translate _d_newarray{mTX, miTX, Op} to a single template - #15819

Merged
RazvanN7 merged 1 commit into
dlang:masterfrom
teodutu:template-_d_newarraymT
Nov 17, 2023
Merged

RazvanN7 merged 1 commit into
dlang:masterfrom
teodutu:template-_d_newarraymT

Conversation

@teodutu

@teodutu teodutu commented Nov 16, 2023 •

Copy link
Copy Markdown
Member
  • Move code for _d_newarraymTX to core.internal.array.construction
  • Remove _d_newarraymiTX and _d_newarraymOp
  • Add unittests for _d_newarraymTX
  • Move lowering to _d_newarraymTX to the semantic phase
  • Inline the lowering when inlining NewExps
  • Add changelog entry about the new hook

@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.

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 "master + dmd#15819"

@teodutu
teodutu force-pushed the template-_d_newarraymT branch 2 times, most recently from 6884ad9 to a6e64d3 Compare November 16, 2023 00:25
@teodutu teodutu changed the title wip: Translate _d_newarray{mTX, miTX, Op} to a single template Translate _d_newarray{mTX, miTX, Op} to a single template Nov 16, 2023
@teodutu
teodutu force-pushed the template-_d_newarraymT branch from a6e64d3 to 095f1ac Compare November 16, 2023 00:26
@teodutu
teodutu marked this pull request as ready for review November 16, 2023 00:26
@teodutu
teodutu requested a review from ibuclaw as a code owner November 16, 2023 00:26
@teodutu
teodutu force-pushed the template-_d_newarraymT branch from 095f1ac to 2cc7ed8 Compare November 16, 2023 00:27
@teodutu

teodutu commented Nov 16, 2023

Copy link
Copy Markdown
Member Author

I'll improve the hook and its nested function in the coming days. Up to now, I just wanted something that works and hopefully passes the CI tests.

@teodutu
teodutu force-pushed the template-_d_newarraymT branch 2 times, most recently from 84975ff to 78e2c8f Compare November 16, 2023 06:34

@RazvanN7 RazvanN7 left a comment

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.

Looks good to me.

@RazvanN7

RazvanN7 commented Nov 16, 2023 •

Copy link
Copy Markdown
Contributor

Looks like some profile gc tests need to be updated.

./generated/linux/debug/64/test_cycles --DRT-oncycle=print > generated/linux/debug/64/cycle_print.done 2>&1; test $? -eq 0
3,4c3,4
<             160	              1	float[][] D main src/profilegc.d:18
<             160	              1	int[][] D main src/profilegc.d:15
---
>             160	              1	float D main src/profilegc.d:18
>             160	              1	int D main src/profilegc.d:15

@teodutu
teodutu force-pushed the template-_d_newarraymT branch 3 times, most recently from 78bb38c to 90dfb5b Compare November 16, 2023 17:09
@RazvanN7

Copy link
Copy Markdown
Contributor

@teodutu maybe also add a changelog entry to be consistent with the previously templated hook?

@teodutu
teodutu force-pushed the template-_d_newarraymT branch 2 times, most recently from 693f694 to c6122bf Compare November 16, 2023 21:35
- Move code for `_d_newarraymTX` to `core.internal.array.construction`
- Remove `_d_newarraymiTX` and `_d_newarraymOp`
- Add unittests for `_d_newarraymTX`
- Move lowering to `_d_newarraymTX` to the semantic phase
- Inline the lowering when inlining `NewExp`s
- Add changelog entry about the new hook

Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
@teodutu
teodutu force-pushed the template-_d_newarraymT branch from c6122bf to e9d70fe Compare November 16, 2023 21:36
@teodutu

teodutu commented Nov 16, 2023

Copy link
Copy Markdown
Member Author

Done @RazvanN7.

@RazvanN7
RazvanN7 merged commit 055accf into dlang:master Nov 17, 2023
@tim-dlang

Copy link
Copy Markdown
Contributor

This caused a regression: https://issues.dlang.org/show_bug.cgi?id=24436

Since #16097 the regression does not happen any more for me.

nybzmr added a commit to nybzmr/dmd that referenced this pull request Mar 19, 2025
…EWARRAYMITX, TRACENEWARRAYMTX and TRACENEWARRAYMITX
thewilsonator pushed a commit that referenced this pull request Mar 19, 2025
* Remove RTLSYM for Translation PR #15819: Removed NEWARRAYMITX, NEWARRAYMITX, TRACENEWARRAYMTX and TRACENEWARRAYMITX

* Remove RTLSYM for Translation PR #15299: Removed NEWARRAYT, NEWARRAYIT, TRACENEWARRAYT and TRACENEWARRAYIT

* Remove RTLSYM for Translation PR #14837: Removed NEWCLASS, TRACENEWCLASS

* Remove RTLSYM for Translation PR #14664: Removed NEWITEMT, NEWITEMIT, TRACENEWITEMT and TRACENEWITEMIT

* Remove RTLSYM for Translation PR #14550: Removed ARRAYCATNTX, ARRAYCATT, TRACEARRAYCATNTX and TRACEARRAYCATT

* Remove RTLSYM for Translation PR #14382: Removed ARRAYSETASSIGN

* Remove RTLSYM for Translation PR #14310: Removed ARRAYASSIGN

* Remove RTLSYM for Translation PR #13495: Removed ARRAYAPPENDT, ARRAYAPPENDCTX, TRACEARRAYAPPENDT and TRACEARRAYAPPENDCTX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

4 participants