Skip to content

Conversation

@rainers
Copy link
Member

@rainers rainers commented Sep 5, 2025

allow RTInfo to be generated from the glue layer as similar members of the TypeInfo, e.g. xeq and xcmp.

This is simpler solution than #2480, but calling back semantic analysis from the glue layer is more of a workaround that takes advantage of the simplicity of the RTInfo template that just evaluates a __traits(getPointerBitmap).

…orted modules

allow RTInfo to be generated from the glue layer as similar members of the TypeInfo, e.g. xeq and xcmp.
it is unnecessary to skip deprecated structs, as Scope's STC.deprecated_ takes care of muting deprecation messages.
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @rainers!

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

// Instantiate RTInfo!S to provide a pointer bitmap for the GC
// Don't do it in -betterC or on unused deprecated / error types
if (!ad.getRTInfo && global.params.useTypeInfo && Type.rtinfo &&
(!ad.isDeprecated() || global.params.useDeprecated != DiagnosticReporting.error) &&
Copy link
Member Author

Choose a reason for hiding this comment

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

This line is removed in the moved code as it is now unnecessary to skip deprecated structs. Scope's STC.deprecated_ takes care of muting deprecation messages.

Copy link
Contributor

@thewilsonator thewilsonator left a comment

Choose a reason for hiding this comment

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

Otherwise looks good

if (!sd.members)
return;

if (sd.semanticRun < PASS.semantic3done)
Copy link
Member Author

Choose a reason for hiding this comment

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

This should not be checked for templates only, as an incomplete TypeInfo can replace the correct one (compiled into the source modules object file) when linking.

@rainers rainers requested a review from ibuclaw as a code owner September 5, 2025 06:46
@thewilsonator thewilsonator merged commit 0b9e7b2 into dlang:master Sep 5, 2025
36 of 43 checks passed
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