-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AST][Sema] Fixes the IterativeTypeChecker and better manages circular protocol inheritance #2123
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
[AST][Sema] Fixes the IterativeTypeChecker and better manages circular protocol inheritance #2123
Conversation
@swift-ci test |
@jopamer Please review. |
@swift-ci test |
cc7ba2c
to
92b7ccb
Compare
LGTM. |
92b7ccb
to
4295970
Compare
@swift-ci Please test |
Awesome work @manavgabhawala, it's really great to see the iterative decl checker getting some attention. |
The linux build timed out, and I'm not really sure why |
@swift-ci Please test and merge |
@DougGregor I think the builds timed out. Is there something I need to do to fix it? |
@harlanhaskins @DougGregor @jopamer Ping. This patch needs to be retested. |
@swift-ci please test |
@shahmishal This build keeps timing out, and I have no idea why... |
Perhaps a rebase would do it (it is quite old). @manavgabhawala Can you |
4295970
to
4da9267
Compare
@CodaFi done |
@swift-ci please test this pull request |
@swift-ci please test |
@harlanhaskins any update on why its timing out? |
@swift-ci please test |
@@ -458,7 +458,9 @@ bool ConformanceLookupTable::addProtocol(NominalTypeDecl *nominal, | |||
|
|||
case ConformanceEntryKind::Implied: | |||
// An implied conformance is better than a synthesized one. | |||
if (kind == ConformanceEntryKind::Synthesized) | |||
// Ignore implied ciruclar protocol inheritance |
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.
Typo -- "ciruclar"
…r protocol inheritance The IterativeTypeChecker now use loops instead of recursion to help keep the stack size low We diagnose circular dependencies for protocols in a more efficient manner and also prevent the possibility of infinite loops
4da9267
to
6b60db3
Compare
@swift-ci Please test and merge |
Tested locally,
|
@rintaro I can shepherd these changes in with another pull request. |
Superseded by the merge of #3747. Thanks @manavgabhawala! |
What's in this pull request?
Improves the diagnostics produced for circular protocol inheritance, further it improves the IterativeTypeChecker to use loops instead of recursion to help minimize the stack size and lastly improves the efficiency of detecting circular inheritance by making it a part of the main cycle when checking for inherited protocols.
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
Validation Testing
Note: Only members of the Apple organization can trigger swift-ci.