Skip to content

Conversation

thewilsonator
Copy link
Contributor

@thewilsonator thewilsonator commented Jul 25, 2025

TODO

  • fix headers
  • determine which flags are used by LDC/GDC and write appropriate wrappers

Is this a sane thing to even do?

@dlang-bot
Copy link
Contributor

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

@thewilsonator thewilsonator force-pushed the exp-flags branch 5 times, most recently from 0d0a528 to a2906c8 Compare July 25, 2025 10:59
@thewilsonator thewilsonator force-pushed the exp-flags branch 8 times, most recently from 8811596 to 1635c00 Compare July 26, 2025 01:58
@rainers
Copy link
Member

rainers commented Jul 26, 2025

Is this a sane thing to even do?

Not a fan. It makes debugging harder, as aliases are not known to the debugger and it will only see flag1/2/3. Is there a way to avoid this under a "Debugger_friendly" version? Adding property methods instead of aliases would allow hovering a value in Visual D and see it in a tool tip.

An alternative might be to place all the bits under their current name into the base class, but the connection to the classes that use it might have to rely on comments only.

Or the generateBitFields mixin should support extending a bitfield variable in the base class, only generating the property methods into the derived class.

@thewilsonator
Copy link
Contributor Author

Adding property methods instead of aliases would allow hovering a value in Visual D and see it in a tool tip.

Some of these flags are used by LDC so we will need them for some, that can easily be extended to all the replaced fields.

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