-
Notifications
You must be signed in to change notification settings - Fork 10.5k
More runtime support for subclass existentials #8958
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 7 commits into
swiftlang:master
from
slavapestov:subclass-existentials-runtime
Apr 25, 2017
Merged
More runtime support for subclass existentials #8958
slavapestov
merged 7 commits into
swiftlang:master
from
slavapestov:subclass-existentials-runtime
Apr 25, 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
@swift-ci Please smoke test |
7c1d367
to
7613d74
Compare
…o the class itself Otherwise, you can run into confusing behavior.
…pened existential
…ric superclass constraint Do the same thing we do for nominal types, where if the type contains an archetype, just mangle the unbound generic form, since the name is just for documentation purposes in LLVM IR dumps and does not have to be unique. This is tested as part of an upcoming patch.
7613d74
to
31dfd65
Compare
@swift-ci Please smoke test |
This handles the case where the left hand side of the cast is known to be class-like, and the right hand side is known at compile time to be a protocol composition type. Note that this change results in a small optimization -- a checked cast of a metatype known to be a class metatype to a class-constrained existential metatype no longer has to emit an explicit check that the source is class-constrained. Fully dynamic casts are coming up next.
31dfd65
to
e0391ca
Compare
@swift-ci Please smoke test |
I suspect this breaks non-smoke tests. An unrelated PR test failed IRGen/subclass_existentials.sil on 32-bit iOS simulator: https://ci.swift.org/job/swift-PR-osx/7053/ |
Jordan is fixing the test in #9020. |
Thanks for tracking down the original commit. |
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.
Builds upon #8876 and #8788.
Next up: dynamic casts.