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

[stdlib] Make unsafe array initializer public #23134

Merged

Conversation

natecook1000
Copy link
Member

@natecook1000 natecook1000 commented Mar 6, 2019

This is an implementation for the re-pitch of SE-0223.

The original underscored version of this initializer remains, with a deprecation notice. Also adds the initializer to ContiguousArray. Still to do:

  • Check inlining attributes, other annotations
  • Add tests for ContiguousArray and the non-underscored Array version

Resolves #45677.

@natecook1000 natecook1000 added the swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review label Mar 6, 2019
@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

2 similar comments
@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000
Copy link
Member Author

@airspeedswift I was expecting this to fail the stable ABI test, since it’s adding new API — does that only track changes and deletions?

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test Linux platform

@natecook1000 natecook1000 marked this pull request as ready for review March 19, 2019 02:55
@natecook1000
Copy link
Member Author

@swift-ci Please smoke test Linux platform

@tkremenek
Copy link
Member

The corresponding evolution proposal has been accepted.

@tkremenek tkremenek added swift evolution approved Flag → feature: A feature that was approved through the Swift evolution process and removed swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review labels Mar 21, 2019
@tkremenek
Copy link
Member

@swift-ci clean test

The original underscored version of this initializer remains, with a
deprecation notice. Also add the initializer to ContiguousArray.
This strategy lets us avoid availability constraints on the new public
methods, since the original underscored version is part of the permanent
ABI.
@natecook1000 natecook1000 force-pushed the nc_unsafeUninitializedCapacity branch from 4f1aa93 to e37f7d5 Compare March 21, 2019 18:06
@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000
Copy link
Member Author

@swift-ci Please test

@swift-ci

This comment has been minimized.

@swift-ci

This comment has been minimized.

Copy link
Contributor

@Catfish-Man Catfish-Man left a comment

Choose a reason for hiding this comment

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

This looks good to me!

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000 natecook1000 merged commit b6bb9d2 into swiftlang:master Mar 23, 2019
natecook1000 added a commit to natecook1000/swift that referenced this pull request Mar 23, 2019
[stdlib] Make unsafe array initializer public

This implements SE-0245. The public versions of this initializer call
into the existing, underscored version, which avoids the need for
availability constraints.
@natecook1000 natecook1000 deleted the nc_unsafeUninitializedCapacity branch August 29, 2019 19:36
@AnthonyLatsis AnthonyLatsis removed the swift evolution approved Flag → feature: A feature that was approved through the Swift evolution process label Apr 18, 2023
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.

6 participants