-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Generic pattern emission refactoring #18882
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
Generic pattern emission refactoring #18882
Conversation
It's confusing to have the generic and concrete type metadata builders share a common base class, when most of the base class is not used for the generic case.
…erBase ClassMetadataBuilderBase only has one subclass now, so fold it in.
ed9f3fd
to
d7a9a2a
Compare
@swift-ci Please test |
@swift-ci Please test source compatibility |
NominalTypeDecl *nominalDecl, | ||
llvm::Value *metadata, | ||
bool isVWTMutable, | ||
MetadataDependencyCollector *collector) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be called emitInitializeValueMetadata
to make it clear that it's not for classes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea
Concrete and generic metadata builders shared a base class, but ever since generic metadata patterns became true-const with a layout distinct from instantiated metadata, the generic case no longer uses most of the functionality of the base class.
This is a refactoring in preparation for giving concrete resilient classes a proper true-const pattern.