Small cleanup for named lazy member loading#29659
Merged
slavapestov merged 2 commits intoswiftlang:masterfrom Feb 13, 2020
Merged
Small cleanup for named lazy member loading#29659slavapestov merged 2 commits intoswiftlang:masterfrom
slavapestov merged 2 commits intoswiftlang:masterfrom
Conversation
Contributor
Author
|
@swift-ci Please smoke test |
Contributor
Author
|
@swift-ci Please test source compatibility |
This cleanup exposed a problem with deserialization recovery and property wrappers. If deserializing a property backed by a wrapper failed, the lazy member lookup would fail, but subsequently a loadAllMembers() call would still load the property. This behavior is actually incorrect, because silently dropping a stored property of a @Frozen struct can result in miscompiles. I've filed rdar://59403542 and rdar://59403617 to track fixing this. In the meantime, I've tweaked the logic a bit to preserve the old behavior.
This allows us to simplify lookupDirect() a fair bit as well.
7698f65 to
0b502d8
Compare
Contributor
Author
|
@xymus Do you mind taking a look at the serialization side of this PR? |
Contributor
Author
|
@swift-ci Please smoke test |
Contributor
Author
|
@swift-ci Please test source compatibility |
xymus
approved these changes
Feb 12, 2020
Contributor
xymus
left a comment
There was a problem hiding this comment.
Thanks for the cleanup in serialization, I'll try to get to that FIXME soon.
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
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.
Now that we never fail out of the fast path, we can simplify some logic in the surrounding code. Follow-up to #26975.