Skip to content

[stdlib] Generalize Array(unsafeUninitializedCapacity:initializingWith:) for typed throws #83160

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

glessard
Copy link
Contributor

Array(unsafeUninitializedCapacity:initializingWith:) (from SE-0245) had not yet been generalized for typed throws.

This does so, making the generalized version an @_alwaysEmitIntoClient function.
This also makes the prespecializations performed by SwiftOnoneSupport unnecessary.

@glessard
Copy link
Contributor Author

@swift-ci please benchmark

@glessard
Copy link
Contributor Author

@swift-ci please Apple Silicon benchmark

@glessard
Copy link
Contributor Author

@swift-ci please smoke test

@glessard glessard marked this pull request as ready for review July 17, 2025 22:56
@glessard glessard requested review from a team and eeckstein as code owners July 17, 2025 22:56
@glessard glessard requested a review from atrick July 17, 2025 22:56
PRESPEC_SYMBOL($sSa28_unsafeUninitializedCapacity16initializingWithSayxGSi_ySryxGz_SiztKXEtKcfCs6UInt16V_Tg5)
PRESPEC_SYMBOL($sSa28_unsafeUninitializedCapacity16initializingWithSayxGSi_ySryxGz_SiztKXEtKcfCs6UInt32V_Tg5)
PRESPEC_SYMBOL($sSa28_unsafeUninitializedCapacity16initializingWithSayxGSi_ySryxGz_SiztKXEtKcfCs6UInt64V_Tg5)
PRESPEC_SYMBOL($sSa28_unsafeUninitializedCapacity16initializingWithSayxGSi_ySryxGz_SiztKXEtKcfCs7UnicodeO6ScalarV_Tg5)
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't removing these symbols from libswiftSwiftOnoneSupport an ABI break?

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.

2 participants