-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add availability information to the new Math function protocols #24187
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
Add availability information to the new Math function protocols #24187
Conversation
@swift-ci please test |
Build failed |
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please smoke test macOS |
@swift-ci please test source compatibility |
The protocols ElementaryFunctions, RealFunctions, and Real are new in Swift 5.1 and accordingly need to have availability attached to them for platforms that are ABI-stable. The actual implementation hooks (static functions) are unconditionally defined on scalar types and marked @_alwaysEmitIntoClient, so they are available even when targeting older library versions, but the protocols themselves, and anything defined in terms of them (the global functions and the SIMD extensions) is only available when targeting library versions that have the new protocols.
…tdlib-builtin floating-point type.
Temporarily pull these back so we can make minor tweaks to the design and get a re-review on SE.
0304247
to
8708c7b
Compare
@swift-ci please test |
@swift-ci please test source compatibility |
Build failed |
@swift-ci please test os x |
…tlang#24187) * Add availability information to the new Math function protocols The protocols ElementaryFunctions, RealFunctions, and Real are new in Swift 5.1 and accordingly need to have availability attached to them for platforms that are ABI-stable. The actual implementation hooks (static functions) are unconditionally defined on scalar types and marked @_alwaysEmitIntoClient, so they are available even when targeting older library versions, but the protocols themselves, and anything defined in terms of them (the global functions and the SIMD extensions) is only available when targeting library versions that have the new protocols. * Additionally provide concrete implementations of signGamma for each stdlib-builtin floating-point type. * Remove Real[Functions] protocols pending re-review Temporarily pull these back so we can make minor tweaks to the design and get a re-review on SE.
…ls (swiftlang#24187)" This reverts commit d2f6959.
The protocols ElementaryFunctions, RealFunctions, and Real are new in Swift 5.1 and accordingly need to have availability attached to them for platforms that are ABI-stable. The actual implementation hooks (static functions) are unconditionally defined on scalar types and marked @_alwaysEmitIntoClient, so they are available even when targeting older library versions, but the protocols themselves, and anything defined in terms of them (the global functions and the SIMD extensions) is only available when targeting library versions that have the new protocols.
This change also restores the statics on SIMD types, when targeting supported standard library versions.
rdar://problem/50060408