Skip to content

Revert "[stdlib] AutoreleasingUnsafeMutablePointer: Switch subscripts to _read accessors" #25714

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 1 commit into from
Jun 24, 2019

Conversation

Catfish-Man
Copy link
Contributor

This was an ABI break, since it didn't make it into 5.0. Using _read here is unimportant, so we're just going to revert rather than try being fancy.

This reverts commit 04586e3.

Fixes rdar://problem/51503385

… to _read accessors"

This was an ABI break, since it didn't make it into 5.0. Using _read here is unimportant, so we're just going to revert rather than try being fancy.

This reverts commit 04586e3.
@Catfish-Man Catfish-Man self-assigned this Jun 24, 2019
@Catfish-Man Catfish-Man requested a review from lorentey June 24, 2019 18:35
@Catfish-Man
Copy link
Contributor Author

@swift-ci please test

@lorentey
Copy link
Member

Cc @nkcsgexi -- this is not currently detected by the ABI checker

@nkcsgexi
Copy link
Contributor

@lorentey Thanks for the heads-up! Filed rdar://52063421 to keep track of this enhancement.

@lorentey
Copy link
Member

I guess adding the original getter and setting _read to @_alwaysEmitIntoClient would be a workable alternative.

I'm rather surprised that pointee._read is called from libswiftCore; apparently @_transparent doesn't do its thing for such accessors. It would be interesting to see what code is generated before/after this change.

@jrose-apple
Copy link
Contributor

If it's satisfying a protocol requirement, it might not be inlined.

@Catfish-Man Catfish-Man merged commit 47a62c0 into swiftlang:master Jun 24, 2019
@jckarter
Copy link
Contributor

If it's going through a protocol requirement, then the set of accessors on the concrete implementation shouldn't impact the abstract interface. @_alwaysEmitIntoClient would still be OK to give concrete code an opportunity to benefit.

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.

5 participants