Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive

Add explicit _d_arrayappendTTrace hook#3807

Merged
dlang-bot merged 1 commit intodlang:masterfrom
teodutu:add-_d_arrayappendTTrace
Apr 23, 2022
Merged

Add explicit _d_arrayappendTTrace hook#3807
dlang-bot merged 1 commit intodlang:masterfrom
teodutu:add-_d_arrayappendTTrace

Conversation

@teodutu
Copy link
Member

@teodutu teodutu commented Apr 22, 2022

When I reworked _d_arrayappendT to a template (#3805), I believed I could recreate _d_arrayappendTTrace in the compiler by just instantiating the old alias:

_d_HookTraceImpl!(Tarr, _d_arrayappendT, errorMessage);

However, this assumption turned out to be incorrect because _d_HookTraceImpl retrieves the types of the hook's parameters using Parameters!Hook. This expression triggered an error when Hook is a template because the types of its parameters weren't inferred yet.

The solution I chose was to add an explicit _d_arrayappendTTrace hook that uses a string mixin for the prints. This change is needed by dlang/dmd#13495.

Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @teodutu! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

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 + druntime#3807"

@dlang-bot dlang-bot merged commit d20bb68 into dlang:master Apr 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants