-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Take several underscored stdlib functions private #18134
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
@swift-ci please smoke benchmark |
@swift-ci please test source compatibility |
@swift-ci please smoke test compiler performance |
Build comment file:Optimized (O)Regression (8)
Improvement (9)
No Changes (443)
Hardware Overview
|
@@ -31,7 +31,7 @@ extension Array : _ObjectiveCBridgeable { | |||
/// The provided `NSArray` will be copied to ensure that the copy can | |||
/// not be mutated by other code. | |||
internal init(_cocoaArray: NSArray) { | |||
_sanityCheck(_isBridgedVerbatimToObjectiveC(Element.self), | |||
precondition(_isBridgedVerbatimToObjectiveC(Element.self), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like an expensive upgrade (for most of the Foundation things). assert
is probably fine, given that _sanityCheck
would have been compiled out in a release build too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that's the better call.
@@ -34,8 +34,6 @@ public func ArchetypeToArchetypeCast<T1, T2>(t1 : T1, t2 : T2) -> T2 { | |||
// CHECK: return [[T0]] | |||
// | |||
// CHECK: bb2 | |||
// CHECK: integer_literal $Builtin.Int1, -1 | |||
// CHECK: cond_fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace the integer_literal+cond_fail with a check for the trap builtin:
// CHECK: builtin "int_trap"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
fd18740
to
d09c2ff
Compare
@swift-ci please test |
Test with swiftlang/swift-corelibs-foundation#1640 @swift-ci please test linux platform |
@swift-ci please test macOS platform |
Test with swiftlang/swift-corelibs-foundation#1640 @swift-ci please test linux platform |
Build failed |
@swift-ci please test macOS platform |
1 similar comment
@swift-ci please test macOS platform |
Build failed |
Test with swiftlang/swift-corelibs-foundation#1640 @swift-ci please test linux platform |
@swift-ci please test macOS platform |
Build failed |
Build failed |
@swift-ci clean test macOS platform |
In many cases, these have leaked out unnecessarily into the SDK or tests. In a few cases, they're needed to do the tests, and might need some work to test in different ways. Mostly just testing perf and compat impact for now.
Starting with various assertiony things.