Repository navigation
Conversation
__traits(vtblSymbol, C) is the vtbl of class C, and __traits(interfaceSymbol, C) is the Interface[] array of class or interface C, which follows its ClassInfo. Their results, and __traits(initSymbol), are now SymbolSlice!T: a length and the address of the symbol. The special cases for the old slice-typed __traits(initSymbol) in CTFE and the glue layer are removed.
Contributor
|
try closing this and reopening this PR from your own fork. That should kill off those failing bootstrap CI runs. |
DMD perf check
Breakdown — compile hello.d
Breakdown — compile Phobos+7.8 M instructions: frontend +4.2 M (+0.12%), codegen +3.6 M (+0.25%)
All measurements
0aab637 vs merge-base 92ac966 · about these metrics |
dkorpel
added a commit
to dkorpel/dmd
that referenced
this pull request
Oct 7, 2026
Minimal, sound variant of dlang#23990: __SymbolSlice fields are immutable and only @System code can construct one, the class must have completed semantic, interfaceSymbol requires a generated ClassInfo, and symbol declarations are cached on the aggregate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dkorpel
added a commit
to dkorpel/dmd
that referenced
this pull request
Oct 7, 2026
Minimal, sound variant of dlang#23990: __SymbolSlice fields are immutable and only @System code can construct one, the class must have completed semantic, interfaceSymbol requires a generated ClassInfo, and symbol declarations are cached on the aggregate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an alternative take on #23940, it creates an artificial slice
SymbolSlice!Tinstead of a real proper one, that way the compiler doesn't need any extra tricks.The disadvantage is that expressions like
typeof(__traits(vtblSymbol, C))and friends will not report(void*)[], but insteadSymbolSlice!(void*), which means they may not interact completely naturally with some set of meta, but these are super-niche things, and really just to facilitate lib-defined ClassInfo; so I think we can live with that imperfection.__traits(vtblSymbol, C)[]would cause it to present as a natural slice and work through any meta correctly.