Skip to content

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

Merged

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Aug 22, 2018

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.

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.
@slavapestov slavapestov force-pushed the generic-pattern-emission-refactoring branch from ed9f3fd to d7a9a2a Compare August 22, 2018 05:31
@slavapestov slavapestov changed the title Generic pattern emission refactoring [WIP] Generic pattern emission refactoring Aug 22, 2018
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov requested a review from rjmccall August 22, 2018 05:37
NominalTypeDecl *nominalDecl,
llvm::Value *metadata,
bool isVWTMutable,
MetadataDependencyCollector *collector) {
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea

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.

2 participants