-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Type checker] Use the request-evaluator in the type checker. #16963
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
[Type checker] Use the request-evaluator in the type checker. #16963
Conversation
488aa56
to
b3aa596
Compare
0af486c
to
5104a6f
Compare
@swift-ci please smoke test |
@swift-ci please test source compatibility |
5104a6f
to
ab76edd
Compare
@swift-ci please smoke test |
@swift-ci please test source compatibility |
1 similar comment
@swift-ci please test source compatibility |
@swift-ci please smoke test |
@swift-ci please smoke test |
@swift-ci please test source compatibility |
@swift-ci please smoke test |
@swift-ci please test source compatibility |
Wire up the request-evaluator with an instance in ASTContext, and introduce two request kinds: one to retrieve the superclass of a class declaration, and one to compute the type of an entry in the inheritance clause. Teach ClassDecl::getSuperclass() to go through the request-evaluator, centralizing the logic to compute and extract the superclass type. Fixes the crasher from rdar://problem/26498438.
TypeLocs have been “validated” when they have a non-null Type, so eliminate the separate “validated” bit that was out-of-sync with the Type field.
Similar to get “superclass of class” request, introduce an “enum raw type” request that is accessed via EnumDecl::getRawType().
…liases. The ITC is providing no benefit here; stop using it.
We were suppressing diagnostics for some request kinds; we shouldn't do that.
…hecker. The type checker has *lots* cycles, and producing diagnostics for them at this point in the development of the request-evaluator is not productive because it breaks currently-working code. Disable cycle diagnostics for now when using the request-evaluator in the type checker. We'll enable it later as things improve, or as a separate logging mode in the interim.
Implement TypeChecker::resolveInheritedProtocols() in terms of "getInheritedType()" queries, instead. [Sema] Put back resolveInheritedProtocols(). We're still depending on it to update state in some cases.
…ecls. Addresses a regression introduced by the request-evaluator in multi-file projects, where some extensions wouldn't get realized until they are needed in IR generation.
94021eb
to
fc7b3c9
Compare
@swift-ci please smoke test |
@swift-ci please test source compatibility |
@swift-ci please smoke test |
@swift-ci please test source compatibility |
…nce. The introduction of the request-evaluator is causing some conformances to be formed before the nominal type's signature is being checked, causing a crash while type-checking the standard library. Ensure that this cannot happen.
@swift-ci please smoke test |
@swift-ci please test source compatibility |
Tests on Linux run cleanly with that last commit. I'm getting excited |
The Linux failure is only the (known) llbuild issue from swiftlang/swift-llbuild#328 |
No description provided.