Skip to content

[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

Merged
merged 10 commits into from
Jun 16, 2018

Conversation

DougGregor
Copy link
Member

No description provided.

@DougGregor DougGregor force-pushed the evaluator-type-checker branch from 488aa56 to b3aa596 Compare June 6, 2018 05:45
@DougGregor DougGregor force-pushed the evaluator-type-checker branch from 0af486c to 5104a6f Compare June 14, 2018 07:09
@DougGregor DougGregor changed the title [WIP] [Type checker] Use the request-evaluator in the type checker. [Type checker] Use the request-evaluator in the type checker. Jun 14, 2018
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor DougGregor force-pushed the evaluator-type-checker branch from 5104a6f to ab76edd Compare June 14, 2018 14:19
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@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.
@DougGregor DougGregor force-pushed the evaluator-type-checker branch from 94021eb to fc7b3c9 Compare June 14, 2018 22:30
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@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.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor
Copy link
Member Author

Tests on Linux run cleanly with that last commit. I'm getting excited

@DougGregor
Copy link
Member Author

The Linux failure is only the (known) llbuild issue from swiftlang/swift-llbuild#328

@DougGregor DougGregor merged commit 18569e5 into swiftlang:master Jun 16, 2018
@DougGregor DougGregor deleted the evaluator-type-checker branch June 16, 2018 05:41
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.

1 participant