-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Handle missing members in protocols as well. #9451
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
jrose-apple
merged 6 commits into
swiftlang:master
from
jrose-apple:protocols-have-tables-too
May 11, 2017
Merged
Handle missing members in protocols as well. #9451
jrose-apple
merged 6 commits into
swiftlang:master
from
jrose-apple:protocols-have-tables-too
May 11, 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 |
jckarter
approved these changes
May 10, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
That is, whether an initializer is 'required', and either does not override anything or overrides a non-required initializer. We don't use this for anything now, but it'll show up in the next commit.
They still aren't hooked up to anything yet, but now we can check that they're showing up where we expect them.
As such, we no longer insert two placeholders for initializers that need two vtable slots; instead we record that in the MissingMemberDecl. I can see MissingMemberDecl growing to be something we'd actually show to users, that can be used for other kinds of declarations that don't have vtable entries, but for now I'm not going to worry about any of that.
...which is sufficient to correctly invoke methods in a vtable even when members have been deleted. 🎉
d78d7ae
to
32068f3
Compare
@swift-ci Please smoke test |
This means both not crashing when we deserialize the protocol but also emitting correct offsets for dynamic dispatch through the protocol's witness table. Also fix a bug with vtable and witness table slots for materializeForSet accessors for properties that can't be imported. Because materializeForSet doesn't have the type of the property in its signature, it was taking a different failure path from everything else, and that failure path didn't properly set the name or flags for the missing member. Finishes rdar://problem/31878396
32068f3
to
aeb0fed
Compare
@swift-ci Please smoke test |
jrose-apple
added a commit
to jrose-apple/swift
that referenced
this pull request
May 11, 2017
…les-too Handle missing members in protocols as well.
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 on top of #9360—only the last commit is different.
This means both not crashing when we deserialize the protocol but also emitting correct offsets for dynamic dispatch through the protocol's witness table.
Also fix a bug with vtable and witness table slots for materializeForSet accessors for properties that can't be imported. Because materializeForSet doesn't have the type of the property in its signature, it was taking a different failure path from everything else, and that failure path didn't properly set the name or flags for the missing member.
Finishes rdar://problem/31878396