Skip to content

[5.0][stdlib] _StringObject: Use a full 8-bit discriminator on 32-bit platforms #20702

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

Conversation

lorentey
Copy link
Member

#20561 gave us plenty of extra inhabitants in the variant enum, so we can get rid of the 7-bit hack.

It’d also be possible now to increase small string capacity to a spacious 11 bytes; however this needs a full overhaul of the 32-bit String representation, so it needs a little bit more time in the oven.

Cherry picked from #20643, reviewed by @milseman
rdar://problem/44232093

…forms

We now have plenty of extra inhabitants in the variant enum, so we can get rid of the 7-bit hack.

It’d also be possible now to increase small string capacity to a spacious 11 bytes; however this needs a full overhaul of the 32-bit representation, so it needs a little bit more time in the oven.
@lorentey lorentey requested a review from a team as a code owner November 22, 2018 12:27
@lorentey
Copy link
Member Author

Note: This is an ABI-breaking change on 32-bit platforms.

@lorentey
Copy link
Member Author

@swift-ci test

@graydon
Copy link
Contributor

graydon commented Nov 22, 2018

As czar I am technically a branch manager; but I do not feel qualified to give positive approval for changes to the branch. czar is strictly a defensive role.

@lorentey
Copy link
Member Author

That's fine! This can wait until @airspeedswift gets back -- I just wanted it up and ready.

Copy link
Member

@milseman milseman left a comment

Choose a reason for hiding this comment

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

LGTM on the original change, LGTM on the cherry-pick

@airspeedswift airspeedswift merged commit ebde767 into swiftlang:swift-5.0-branch Nov 26, 2018
@lorentey lorentey deleted the string-32-simple-5.0 branch November 26, 2018 18:45
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.

4 participants