Skip to content

[Type checker] Add a request for overridden declarations #17878

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

Closed

Conversation

DougGregor
Copy link
Member

No description provided.

The use of getAsClassOrClassExtensionContext() obviates the need for a
specific isTypeContext() check. NFC.
…ookup.

Make the TypeChecker’s name-lookup routines static, so they don’t depend
on the TypeCheck instance… except for one pesky place where we jump back
into protocol conformance checking. This is part of teasing apart the type
checker.
…nyRequest

The default move constructor and move assignment operator of AnyRequest
would leave the source object in an odd state that’s destructible but
does not maintain the invariant that all “normal” states store a real
instance. This state breaks DenseMap, which assumes that a moved-from
object is still washable.
Don’t ask to compute overridden declarations that haven’t already been
computed.
Introduce a new request kind to capture the computation of the set of
overridden declarations of a given declaration, eliminating the
stateful “setOverriddenDecls()” calls from the type checker.
The overridden declarations of accessors are computed; they don’t need to
be set explicitly.
@DougGregor DougGregor force-pushed the overridden-decls-request branch from 71de635 to 7f70cbf Compare July 11, 2018 14:55
@DougGregor
Copy link
Member Author

This can't build the Foundation overlay due to a cycle between override checking and @objc checking. I may need to make both requests before I can land either one :(

@DougGregor
Copy link
Member Author

This keeps growing. New PR up at #17976

@DougGregor DougGregor closed this Jul 16, 2018
@DougGregor DougGregor deleted the overridden-decls-request branch July 16, 2018 16:59
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