-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[5.0] Make SIMD types Codable. #22110
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
[5.0] Make SIMD types Codable. #22110
Conversation
* Make SIMD types codable. We're considering this a bugfix. This is a very tiny ABI change, in that user-defined SIMD types compiled with an earlier version of 5.0 will be missing the necessary conformance to Codable. Discussed with Ben, and we're OK with this because we don't think there are such types yet, and it can be fixed with a recompile. * Add basic tests
@swift-ci please test |
Build failed |
Build failed |
It looks like JSONEncoder can't round-trip floating-point values on i386 only. Likely an x87 excess-precision bug, but I don't have time to investigate right now. Tracked by https://bugs.swift.org/browse/SR-9759
@swift-ci please test |
Build failed |
Build failed |
Linux failure unrelated. |
@swift-ci please test Linux |
…e as JS "integers"
@swift-ci Please test |
Build failed |
Build failed |
These are still breaking on 10.11, so we'll turn them off for now.
@swift-ci please test |
Build failed |
Build failed |
@swift-ci test |
Build failed |
Build failed |
Explanation: This is a very tiny ABI change, in that user-defined SIMD types compiled with an earlier version of 5.0 will be missing the necessary conformance to Codable. Discussed with Ben, and we're OK with this because we don't think there are such types yet, and it can be fixed with a recompile. However, because of this consideration we either need to do this in 5.0 or not at all (for now).
Scope: Limited. Adds a common conformance to SIMD types that should be baseline for any new stdlib type. Some adopters may need to remove existing retroactive conformances.
Issue: rdar://problem/47549986
Risk: Low.
Testing: Passed CI testing on master, including new tests for this conformance.
Reviewed by: @airspeedswift (#22092)