Skip to content

[5.0] [string] Fix string implementation for big endian platforms #22614

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

Conversation

mundaym
Copy link
Contributor

@mundaym mundaym commented Feb 14, 2019

Backport of #21077 to the 5.0 branch.

This fix is needed for the new small string optimizations to work on big endian platforms. It doesn't affect the ABI.

This commit supersedes 2866b4a which was overwritten by 4ab45df.

Store small string code units in little-endian byte order. This way
the code units are in the same order on all machines and can be
safely treated as an array of bytes.
Clarify the expected behavior of some small string helper functions.
@mundaym mundaym requested a review from a team as a code owner February 14, 2019 10:44
@tkremenek
Copy link
Member

@swift-ci clean test

@tkremenek
Copy link
Member

@milseman @airspeedswift please review

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

@tkremenek tkremenek merged commit 817dff3 into swiftlang:swift-5.0-branch Feb 18, 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