Skip to content
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

Update for SE-0025 ('private' and 'fileprivate') #445

Merged
merged 1 commit into from
Jul 25, 2016

Conversation

jrose-apple
Copy link
Contributor

SE-0025 makes private restrict access to a lexical scope; the Swift 2 behavior is now named fileprivate. At the time of this pull request, the compiler treats both private and fileprivate as having fileprivate semantics, but that will soon change.

Supersedes #413; the latest amendment to SE-0025 permits some accesses that the original model (or at least our interpretation of it) would have forbidden. This was done by hand, so it's possible I missed a few cases, but it's at least a smaller diff.

@phausler
Copy link
Contributor

Looks good to me, I wonder if we should actually consider some of these for internal versus fileprivate is there a performance differential (either compilation time or execution time?)

@phausler
Copy link
Contributor

Good to merge as soon as the binary drops of the toolchain have this feature

@jrose-apple
Copy link
Contributor Author

Both fileprivate and private are a bit more optimizable than internal, though that matters less under WMO. Compilation may also be slightly faster, but probably not in any significant way.

@jrose-apple
Copy link
Contributor Author

jrose-apple commented Jul 25, 2016

Today's toolchain should have 'fileprivate' support (treating it largely the same as 'private'). Okay to merge?

@parkera
Copy link
Contributor

parkera commented Jul 25, 2016

@swift-ci please test

@parkera
Copy link
Contributor

parkera commented Jul 25, 2016

CI is in an awful state; let's make sure we are not making things worse.

@jrose-apple
Copy link
Contributor Author

Good call. Looks like it passed—good to go?

@parkera parkera merged commit 958a93e into swiftlang:master Jul 25, 2016
@jrose-apple jrose-apple deleted the fileprivate branch July 26, 2016 00:17
jrose-apple added a commit to swiftlang/swift that referenced this pull request Jul 26, 2016
Similar to the work in swiftlang/swift-corelibs-foundation#445.

Groundwork for SE-0025 ('private' and 'fileprivate').
No intended functionality change.
jrose-apple added a commit to swiftlang/swift that referenced this pull request Jul 26, 2016
Similar to the work in swiftlang/swift-corelibs-foundation#445.

Groundwork for SE-0025 ('private' and 'fileprivate').
No intended functionality change.
DaveLiu888 pushed a commit to DaveLiu888/swift-corelibs-foundation that referenced this pull request Jul 28, 2016
millenomi pushed a commit that referenced this pull request Nov 11, 2020
Similar to the work in #445.

Groundwork for SE-0025 ('private' and 'fileprivate').
No intended functionality change.
millenomi pushed a commit that referenced this pull request Nov 11, 2020
Similar to the work in #445.

Groundwork for SE-0025 ('private' and 'fileprivate').
No intended functionality change.
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