Skip to content

Split off StorageImplInfo from AccessorRecord #26235

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
merged 2 commits into from
Jul 23, 2019

Conversation

slavapestov
Copy link
Contributor

This is in service of creating a request to compute AbstractStorageDecl::getStorageImplInfo(). Should be NFC.

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov requested a review from rjmccall July 19, 2019 04:24
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 3773ad5c13fa690c601eea94780001885a6bb98f

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 3773ad5c13fa690c601eea94780001885a6bb98f

Copy link
Contributor

@rjmccall rjmccall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be easier to review patches if you focused on one thing per PR instead of also throwing in a refactor of how we represent storage specifiers.

Please continue using a specifier enum on VarDecl instead of a boolean isLet; it's clearer in source and will allow minor extensions in this area (e.g. local shared/inout bindings) to avoid having to refactor it back.

The parts of the patch that are actually specific to the representation of StorageImplInfo in an AbstractStorageDecl seem reasonable.

We want to compute the former independently of the latter.
It's only 16 bits so storing it inside the Decl is fine;
it also allows us to eliminate the 'compact' representation
where an AbstractStorageDecl without an accessor record is
assumed to be stored.
@slavapestov
Copy link
Contributor Author

@rjmccall Alright, I'm now using a new VarDecl::Introducer enum to distinguish var from let.

@slavapestov
Copy link
Contributor Author

apple/swift-lldb#1820
@swift-ci Please test

@slavapestov
Copy link
Contributor Author

apple/swift-lldb#1820
@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 454281b

@slavapestov
Copy link
Contributor Author

apple/swift-lldb#1820
@swift-ci Please test Linux

@slavapestov slavapestov merged commit 755c02c into swiftlang:master Jul 23, 2019
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.

3 participants