-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Prepare for finalizeDecl() removal #26160
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
Prepare for finalizeDecl() removal #26160
Conversation
@swift-ci Please test |
@swift-ci Please test source compatibility |
@swift-ci Please test compiler performance |
// FIXME: Once accessor synthesis and getInterfaceType() itself are | ||
// request-ified this goes away. | ||
if (!fn->hasValidSignature()) { | ||
S.M->getASTContext().getLazyResolver()->resolveDeclSignature( |
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.
Can you assert that the accessor is synthesized in this case? We definitely do not want any explicitly-written accessors to be skipped.
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.
No problem. However do keep in mind this whole 'if' check will go away at some point.
// If we didn't report an error, but we encountered a property that | ||
// hadn't been type-checked, queue the type for delayed checking. | ||
if (RequireDelayedChecking) { | ||
TC.DelayedCircularityChecks.push_back(OriginalDecl); |
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.
w00t!
The idea here is to split up the logic into three parts: - computation of the final ImplInfo for lazy, property wrappers and @NSManaged - deciding if we should add accessors or not - actually adding the accessors
Since validateDecl() never calls back into typeCheckDecl(), I think it's safe to call validateDecl() from circularity checking.
463dcab
to
a347dce
Compare
@swift-ci Please smoke test |
An assortment of somewhat random refactorings.