-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Preliminary SILGen support for subclass existentials (SE-0156) #8685
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
slavapestov
merged 9 commits into
swiftlang:master
from
slavapestov:subclass-existentials-silgen
Apr 12, 2017
Merged
Preliminary SILGen support for subclass existentials (SE-0156) #8685
slavapestov
merged 9 commits into
swiftlang:master
from
slavapestov:subclass-existentials-silgen
Apr 12, 2017
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3d0add7
to
661047b
Compare
@swift-ci Please smoke test |
661047b
to
1089fa8
Compare
@swift-ci Please smoke test |
1089fa8
to
de254ea
Compare
@swift-ci Please smoke test |
1 similar comment
@swift-ci Please smoke test |
Make sure we use the right 'self' type in various places. When calling a Self-returning class method on a subclass existential, the following has to happen correctly: - The existential is opened to produce an archetype with a superclass constraint. - The archetype is upcast to a class type to produce the 'self' parameter for the call. - The method call returns a value with the same type as the 'self' parameter. - The return value is downcast to the opened archetype. - The opened archetype is converted back to an existential. Some SILGen tests in an upcoming patch exercise this code path.
Now that mayHaveSuperclass() is back to its old meaning, we can't piggy-back off of it anymore and must add a new bit of logic for class-constrained existential to superclass conversions. Also re-organize the code a bit.
de254ea
to
67ec712
Compare
@swift-ci Please smoke test |
1 similar comment
@swift-ci Please smoke test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow-up to #8650.
The mangling for 'XE' generalized existentials is going to change again soon. Also I need to write more detailed SILGen tests.
Up next: