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

Move toChars overrides to hdrgen.d #20804

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

dkorpel
Copy link
Contributor

@dkorpel dkorpel commented Jan 30, 2025

It's really confusing how both dmd.hdrgen calls into ASTNode.toChars, and toChars calls into dmd.hdrgen. It's also confusing how toChars is sometimes unused / incomplete / used for internal debugging, and other times expected to generate working D code / stringof / error messages. This moves towards letting ASTNode.toChars (or toString) call dmd.hdrgen, and differentiate uses with HdrGenState.

@dkorpel dkorpel added the Severity:Refactoring No semantic changes to code label Jan 30, 2025
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @dkorpel! 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 + dmd#20804"

@dkorpel dkorpel force-pushed the tochars-devirtualize branch from 6fadd22 to 8b99f8d Compare January 30, 2025 16:35
@dkorpel dkorpel requested a review from ibuclaw as a code owner January 30, 2025 16:35
@dkorpel dkorpel force-pushed the tochars-devirtualize branch 5 times, most recently from 5edb0f0 to 7e62fc8 Compare January 30, 2025 17:17
@dkorpel dkorpel force-pushed the tochars-devirtualize branch from 7e62fc8 to 0a3fb00 Compare January 30, 2025 17:23
@dkorpel dkorpel merged commit f4558fe into dlang:master Jan 30, 2025
41 of 42 checks passed
@dkorpel dkorpel deleted the tochars-devirtualize branch January 30, 2025 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Severity:Refactoring No semantic changes to code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants