Skip to content

Commit 2e9ab88

Browse files
committed
Genereralize standard library ABI stability test for arm64 macOS
... and now that it is fixed for the platform I'm developing odd, add the missing entries for typed throws on withUnsafe(Mutable)BufferPointer.
1 parent f8d483d commit 2e9ab88

5 files changed

+122
-4
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// ABI additions for arm64 only.
2+
3+
Accessor __VaListBuilder.storage.Get() has mangled name changing from 'Swift.__VaListBuilder.storage.getter : Swift.ContiguousArray<Swift.Int>' to 'Swift.__VaListBuilder.storage.getter : Swift.Optional<Swift.UnsafeMutablePointer<Swift.Int>>'
4+
Accessor __VaListBuilder.storage.Get() has return type change from Swift.ContiguousArray<Swift.Int> to Swift.UnsafeMutablePointer<Swift.Int>?
5+
Accessor __VaListBuilder.storage.Modify() has mangled name changing from 'Swift.__VaListBuilder.storage.modify : Swift.ContiguousArray<Swift.Int>' to 'Swift.__VaListBuilder.storage.modify : Swift.Optional<Swift.UnsafeMutablePointer<Swift.Int>>'
6+
Accessor __VaListBuilder.storage.Set() has mangled name changing from 'Swift.__VaListBuilder.storage.setter : Swift.ContiguousArray<Swift.Int>' to 'Swift.__VaListBuilder.storage.setter : Swift.Optional<Swift.UnsafeMutablePointer<Swift.Int>>'
7+
Accessor __VaListBuilder.storage.Set() has parameter 0 type change from Swift.ContiguousArray<Swift.Int> to Swift.UnsafeMutablePointer<Swift.Int>?
8+
Constructor BinaryFloatingPoint.init(_:) has been removed
9+
Constructor Double.init(_:) has mangled name changing from 'Swift.Double.init(Swift.Float80) -> Swift.Double' to 'Swift.Double.init(Swift.Float16) -> Swift.Double'
10+
Constructor Double.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
11+
Constructor Double.init(_builtinFloatLiteral:) has mangled name changing from 'Swift.Double.init(_builtinFloatLiteral: Builtin.FPIEEE80) -> Swift.Double' to 'Swift.Double.init(_builtinFloatLiteral: Builtin.FPIEEE64) -> Swift.Double'
12+
Constructor Double.init(_builtinFloatLiteral:) has parameter 0 type change from Builtin.FPIEEE80 to Builtin.FPIEEE64
13+
Constructor Double.init(exactly:) has mangled name changing from 'Swift.Double.init(exactly: Swift.Float80) -> Swift.Optional<Swift.Double>' to 'Swift.Double.init(exactly: Swift.Float16) -> Swift.Optional<Swift.Double>'
14+
Constructor Double.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
15+
Constructor Float.init(_:) has mangled name changing from 'Swift.Float.init(Swift.Float80) -> Swift.Float' to 'Swift.Float.init(Swift.Float16) -> Swift.Float'
16+
Constructor Float.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
17+
Constructor Float.init(_builtinFloatLiteral:) has mangled name changing from 'Swift.Float.init(_builtinFloatLiteral: Builtin.FPIEEE80) -> Swift.Float' to 'Swift.Float.init(_builtinFloatLiteral: Builtin.FPIEEE64) -> Swift.Float'
18+
Constructor Float.init(_builtinFloatLiteral:) has parameter 0 type change from Builtin.FPIEEE80 to Builtin.FPIEEE64
19+
Constructor Float.init(exactly:) has mangled name changing from 'Swift.Float.init(exactly: Swift.Float80) -> Swift.Optional<Swift.Float>' to 'Swift.Float.init(exactly: Swift.Float16) -> Swift.Optional<Swift.Float>'
20+
Constructor Float.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
21+
Constructor Int.init(_:) has mangled name changing from 'Swift.Int.init(Swift.Float80) -> Swift.Int' to 'Swift.Int.init(Swift.Float16) -> Swift.Int'
22+
Constructor Int.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
23+
Constructor Int.init(exactly:) has mangled name changing from 'Swift.Int.init(exactly: Swift.Float80) -> Swift.Optional<Swift.Int>' to 'Swift.Int.init(exactly: Swift.Float16) -> Swift.Optional<Swift.Int>'
24+
Constructor Int.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
25+
Constructor Int16.init(_:) has mangled name changing from 'Swift.Int16.init(Swift.Float80) -> Swift.Int16' to 'Swift.Int16.init(Swift.Float16) -> Swift.Int16'
26+
Constructor Int16.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
27+
Constructor Int16.init(exactly:) has mangled name changing from 'Swift.Int16.init(exactly: Swift.Float80) -> Swift.Optional<Swift.Int16>' to 'Swift.Int16.init(exactly: Swift.Float16) -> Swift.Optional<Swift.Int16>'
28+
Constructor Int16.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
29+
Constructor Int32.init(_:) has mangled name changing from 'Swift.Int32.init(Swift.Float80) -> Swift.Int32' to 'Swift.Int32.init(Swift.Float16) -> Swift.Int32'
30+
Constructor Int32.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
31+
Constructor Int32.init(exactly:) has mangled name changing from 'Swift.Int32.init(exactly: Swift.Float80) -> Swift.Optional<Swift.Int32>' to 'Swift.Int32.init(exactly: Swift.Float16) -> Swift.Optional<Swift.Int32>'
32+
Constructor Int32.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
33+
Constructor Int64.init(_:) has mangled name changing from 'Swift.Int64.init(Swift.Float80) -> Swift.Int64' to 'Swift.Int64.init(Swift.Float16) -> Swift.Int64'
34+
Constructor Int64.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
35+
Constructor Int64.init(exactly:) has mangled name changing from 'Swift.Int64.init(exactly: Swift.Float80) -> Swift.Optional<Swift.Int64>' to 'Swift.Int64.init(exactly: Swift.Float16) -> Swift.Optional<Swift.Int64>'
36+
Constructor Int64.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
37+
Constructor Int8.init(_:) has mangled name changing from 'Swift.Int8.init(Swift.Float80) -> Swift.Int8' to 'Swift.Int8.init(Swift.Float16) -> Swift.Int8'
38+
Constructor Int8.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
39+
Constructor Int8.init(exactly:) has mangled name changing from 'Swift.Int8.init(exactly: Swift.Float80) -> Swift.Optional<Swift.Int8>' to 'Swift.Int8.init(exactly: Swift.Float16) -> Swift.Optional<Swift.Int8>'
40+
Constructor Int8.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
41+
Constructor UInt.init(_:) has mangled name changing from 'Swift.UInt.init(Swift.Float80) -> Swift.UInt' to 'Swift.UInt.init(Swift.Float16) -> Swift.UInt'
42+
Constructor UInt.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
43+
Constructor UInt.init(exactly:) has mangled name changing from 'Swift.UInt.init(exactly: Swift.Float80) -> Swift.Optional<Swift.UInt>' to 'Swift.UInt.init(exactly: Swift.Float16) -> Swift.Optional<Swift.UInt>'
44+
Constructor UInt.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
45+
Constructor UInt16.init(_:) has mangled name changing from 'Swift.UInt16.init(Swift.Float80) -> Swift.UInt16' to 'Swift.UInt16.init(Swift.Float16) -> Swift.UInt16'
46+
Constructor UInt16.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
47+
Constructor UInt16.init(exactly:) has mangled name changing from 'Swift.UInt16.init(exactly: Swift.Float80) -> Swift.Optional<Swift.UInt16>' to 'Swift.UInt16.init(exactly: Swift.Float16) -> Swift.Optional<Swift.UInt16>'
48+
Constructor UInt16.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
49+
Constructor UInt32.init(_:) has mangled name changing from 'Swift.UInt32.init(Swift.Float80) -> Swift.UInt32' to 'Swift.UInt32.init(Swift.Float16) -> Swift.UInt32'
50+
Constructor UInt32.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
51+
Constructor UInt32.init(exactly:) has mangled name changing from 'Swift.UInt32.init(exactly: Swift.Float80) -> Swift.Optional<Swift.UInt32>' to 'Swift.UInt32.init(exactly: Swift.Float16) -> Swift.Optional<Swift.UInt32>'
52+
Constructor UInt32.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
53+
Constructor UInt64.init(_:) has mangled name changing from 'Swift.UInt64.init(Swift.Float80) -> Swift.UInt64' to 'Swift.UInt64.init(Swift.Float16) -> Swift.UInt64'
54+
Constructor UInt64.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
55+
Constructor UInt64.init(exactly:) has mangled name changing from 'Swift.UInt64.init(exactly: Swift.Float80) -> Swift.Optional<Swift.UInt64>' to 'Swift.UInt64.init(exactly: Swift.Float16) -> Swift.Optional<Swift.UInt64>'
56+
Constructor UInt64.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
57+
Constructor UInt8.init(_:) has mangled name changing from 'Swift.UInt8.init(Swift.Float80) -> Swift.UInt8' to 'Swift.UInt8.init(Swift.Float16) -> Swift.UInt8'
58+
Constructor UInt8.init(_:) has parameter 0 type change from Swift.Float80 to Swift.Float16
59+
Constructor UInt8.init(exactly:) has mangled name changing from 'Swift.UInt8.init(exactly: Swift.Float80) -> Swift.Optional<Swift.UInt8>' to 'Swift.UInt8.init(exactly: Swift.Float16) -> Swift.Optional<Swift.UInt8>'
60+
Constructor UInt8.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
61+
Constructor _ExpressibleByBuiltinFloatLiteral.init(_builtinFloatLiteral:) has mangled name changing from 'Swift._ExpressibleByBuiltinFloatLiteral.init(_builtinFloatLiteral: Builtin.FPIEEE80) -> A' to 'Swift._ExpressibleByBuiltinFloatLiteral.init(_builtinFloatLiteral: Builtin.FPIEEE64) -> A'
62+
Constructor _ExpressibleByBuiltinFloatLiteral.init(_builtinFloatLiteral:) has parameter 0 type change from Builtin.FPIEEE80 to Builtin.FPIEEE64
63+
Func __VaListBuilder.allocStorage(wordCount:) is a new API without @available attribute
64+
Func __VaListBuilder.appendWords(_:) is a new API without @available attribute
65+
Func __VaListBuilder.deallocStorage(wordCount:storage:) is a new API without @available attribute
66+
Func __VaListBuilder.rawSizeAndAlignment(_:) is a new API without @available attribute
67+
Func _cos(_:) has been removed
68+
Func _exp(_:) has been removed
69+
Func _exp2(_:) has been removed
70+
Func _log(_:) has been removed
71+
Func _log10(_:) has been removed
72+
Func _log2(_:) has been removed
73+
Func _nearbyint(_:) has been removed
74+
Func _rint(_:) has been removed
75+
Func _sin(_:) has been removed
76+
Struct Float80 has been removed
77+
Struct __VaListBuilder.Header has been removed
78+
Var __VaListBuilder.allocated is a new API without @available attribute
79+
Var __VaListBuilder.allocated is added to a non-resilient type
80+
Var __VaListBuilder.count is a new API without @available attribute
81+
Var __VaListBuilder.count is added to a non-resilient type
82+
Var __VaListBuilder.fpRegistersUsed has been removed
83+
Var __VaListBuilder.gpRegistersUsed has been removed
84+
Var __VaListBuilder.header has been removed
85+
Var __VaListBuilder.requiredAlignmentInBytes is a new API without @available attribute
86+
Var __VaListBuilder.requiredAlignmentInBytes is added to a non-resilient type
87+
Var __VaListBuilder.storage has declared type change from Swift.ContiguousArray<Swift.Int> to Swift.UnsafeMutablePointer<Swift.Int>?
88+
Var __VaListBuilder.storage has mangled name changing from 'Swift.__VaListBuilder.storage : Swift.ContiguousArray<Swift.Int>' to 'Swift.__VaListBuilder.storage : Swift.Optional<Swift.UnsafeMutablePointer<Swift.Int>>'
89+
Var _countFPRegisters has been removed
90+
Var _countGPRegisters has been removed
91+
Var _fpRegisterWords has been removed
92+
Var _registerSaveWords has been removed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// ABI additions for x86_64 only.

test/api-digester/Outputs/stability-stdlib-source-arm64.swift.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ Constructor UInt8.init(_:) has parameter 0 type change from Swift.Float80 to Swi
3232
Constructor UInt8.init(exactly:) has parameter 0 type change from Swift.Float80 to Swift.Float16
3333
Struct Float80 has been removed
3434
TypeAlias CLongDouble has underlying type change from Swift.Float80 to Swift.Double
35-
Constructor Double.init(exactly:) has generic signature change from to <Source where Source : Swift.BinaryInteger>
35+
Constructor Double.init(exactly:) has generic signature change from to <Source where Source : Swift.BinaryInteger>

test/api-digester/stability-stdlib-abi-with-asserts.test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// RUN: %api-digester -diagnose-sdk -module Swift -o %t.tmp/changes.txt -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk -abi -avoid-location
44
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-without-asserts.test -o - > %t.tmp/stability-stdlib-abi.swift.expected
55
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-with-asserts.test -o - >> %t.tmp/stability-stdlib-abi.swift.expected
6+
// RUN: %clang -E -P -x c %S/Inputs/stability-stdlib-abi-without-asserts-%target-cpu.txt -o - >> %t.tmp/stability-stdlib-abi.swift.expected
67
// RUN: %clang -E -P -x c %t.tmp/stability-stdlib-abi.swift.expected -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-abi.swift.expected.sorted
78
// RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed -E -e '/^\s*$/d' -e 's/ in _[0-9A-F]{32}/ in #UNSTABLE ID#/g' | sort > %t.tmp/changes.txt.tmp
89
// RUN: diff -u %t.tmp/stability-stdlib-abi.swift.expected.sorted %t.tmp/changes.txt.tmp
@@ -46,7 +47,8 @@
4647
// https://github.com/apple/swift/issues/55803
4748
// We currently only have a baseline for Intel CPUs on macOS.
4849
// REQUIRES: OS=macosx
49-
// REQUIRES: CPU=x86_64
50+
// XFAIL: CPU=arm64e
51+
5052

5153
// The digester can incorrectly register a generic signature change when
5254
// declarations are shuffled. rdar://problem/46618883

test/api-digester/stability-stdlib-abi-without-asserts.test

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// RUN: %empty-directory(%t.tmp)
22
// mkdir %t.tmp/module-cache && mkdir %t.tmp/dummy.sdk
33
// RUN: %api-digester -diagnose-sdk -module Swift -o %t.tmp/changes.txt -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk -abi -avoid-location -v
4-
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-without-asserts.test -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-abi.swift.expected
4+
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-without-asserts.test -o - | sed '/^\s*$/d' > %t.tmp/stability-stdlib-abi.swift.expected
5+
// RUN: %clang -E -P -x c %S/Inputs/stability-stdlib-abi-without-asserts-%target-cpu.txt -o - >> %t.tmp/stability-stdlib-abi.swift.expected
6+
// RUN: %clang -E -P -x c %t.tmp/stability-stdlib-abi.swift.expected -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-abi.swift.expected.sorted
57
// RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed -E -e '/^\s*$/d' -e 's/ in _[0-9A-F]{32}/ in #UNSTABLE ID#/g' | sort > %t.tmp/changes.txt.tmp
6-
// RUN: diff -u %t.tmp/stability-stdlib-abi.swift.expected %t.tmp/changes.txt.tmp
8+
// RUN: diff -u %t.tmp/stability-stdlib-abi.swift.expected.sorted %t.tmp/changes.txt.tmp
79

810
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment below.)
911

@@ -794,4 +796,25 @@ Var UnsafeMutableBufferPointer.debugDescription is now with @_preInverseGenerics
794796

795797
Func FixedWidthInteger.&*(_:_:) has been added as a protocol requirement
796798

799+
Func Array.withUnsafeMutableBufferPointer(_:) has been renamed to Func __abi_withUnsafeMutableBufferPointer(_:)
800+
Func Array.withUnsafeMutableBufferPointer(_:) has mangled name changing from 'Swift.Array.withUnsafeMutableBufferPointer<A>((inout Swift.UnsafeMutableBufferPointer<A>) throws -> A1) throws -> A1' to 'Swift.Array.__abi_withUnsafeMutableBufferPointer<A>((inout Swift.UnsafeMutableBufferPointer<A>) throws -> A1) throws -> A1'
801+
Func ArraySlice.withUnsafeMutableBufferPointer(_:) has been renamed to Func __abi_withUnsafeMutableBufferPointer(_:)
802+
Func ArraySlice.withUnsafeMutableBufferPointer(_:) has mangled name changing from 'Swift.ArraySlice.withUnsafeMutableBufferPointer<A>((inout Swift.UnsafeMutableBufferPointer<A>) throws -> A1) throws -> A1' to 'Swift.ArraySlice.__abi_withUnsafeMutableBufferPointer<A>((inout Swift.UnsafeMutableBufferPointer<A>) throws -> A1) throws -> A1'
803+
Func ContiguousArray.withUnsafeMutableBufferPointer(_:) has been renamed to Func __abi_withUnsafeMutableBufferPointer(_:)
804+
Func ContiguousArray.withUnsafeMutableBufferPointer(_:) has mangled name changing from 'Swift.ContiguousArray.withUnsafeMutableBufferPointer<A>((inout Swift.UnsafeMutableBufferPointer<A>) throws -> A1) throws -> A1' to 'Swift.ContiguousArray.__abi_withUnsafeMutableBufferPointer<A>((inout Swift.UnsafeMutableBufferPointer<A>) throws -> A1) throws -> A1'
805+
Func _ArrayBuffer.withUnsafeBufferPointer(_:) has been renamed to Func __abi_withUnsafeBufferPointer(_:)
806+
Func _ArrayBuffer.withUnsafeBufferPointer(_:) has mangled name changing from 'Swift._ArrayBuffer.withUnsafeBufferPointer<A>((Swift.UnsafeBufferPointer<A>) throws -> A1) throws -> A1' to 'Swift._ArrayBuffer.__abi_withUnsafeBufferPointer<A>((Swift.UnsafeBufferPointer<A>) throws -> A1) throws -> A1'
807+
Func _ArrayBuffer.withUnsafeMutableBufferPointer(_:) has been renamed to Func __abi_withUnsafeMutableBufferPointer(_:)
808+
Func _ArrayBuffer.withUnsafeMutableBufferPointer(_:) has mangled name changing from 'Swift._ArrayBuffer.withUnsafeMutableBufferPointer<A>((Swift.UnsafeMutableBufferPointer<A>) throws -> A1) throws -> A1' to 'Swift._ArrayBuffer.__abi_withUnsafeMutableBufferPointer<A>((Swift.UnsafeMutableBufferPointer<A>) throws -> A1) throws -> A1'
809+
Func _ArrayBufferProtocol.withUnsafeBufferPointer(_:) has been added as a protocol requirement
810+
Func _ArrayBufferProtocol.withUnsafeMutableBufferPointer(_:) has been added as a protocol requirement
811+
Func _ContiguousArrayBuffer.withUnsafeBufferPointer(_:) has been renamed to Func __abi_withUnsafeBufferPointer(_:)
812+
Func _ContiguousArrayBuffer.withUnsafeBufferPointer(_:) has mangled name changing from 'Swift._ContiguousArrayBuffer.withUnsafeBufferPointer<A>((Swift.UnsafeBufferPointer<A>) throws -> A1) throws -> A1' to 'Swift._ContiguousArrayBuffer.__abi_withUnsafeBufferPointer<A>((Swift.UnsafeBufferPointer<A>) throws -> A1) throws -> A1'
813+
Func _ContiguousArrayBuffer.withUnsafeMutableBufferPointer(_:) has been renamed to Func __abi_withUnsafeMutableBufferPointer(_:)
814+
Func _ContiguousArrayBuffer.withUnsafeMutableBufferPointer(_:) has mangled name changing from 'Swift._ContiguousArrayBuffer.withUnsafeMutableBufferPointer<A>((Swift.UnsafeMutableBufferPointer<A>) throws -> A1) throws -> A1' to 'Swift._ContiguousArrayBuffer.__abi_withUnsafeMutableBufferPointer<A>((Swift.UnsafeMutableBufferPointer<A>) throws -> A1) throws -> A1'
815+
Func _SliceBuffer.withUnsafeBufferPointer(_:) has been renamed to Func __abi_withUnsafeBufferPointer(_:)
816+
Func _SliceBuffer.withUnsafeBufferPointer(_:) has mangled name changing from 'Swift._SliceBuffer.withUnsafeBufferPointer<A>((Swift.UnsafeBufferPointer<A>) throws -> A1) throws -> A1' to 'Swift._SliceBuffer.__abi_withUnsafeBufferPointer<A>((Swift.UnsafeBufferPointer<A>) throws -> A1) throws -> A1'
817+
Func _SliceBuffer.withUnsafeMutableBufferPointer(_:) has been renamed to Func __abi_withUnsafeMutableBufferPointer(_:)
818+
Func _SliceBuffer.withUnsafeMutableBufferPointer(_:) has mangled name changing from 'Swift._SliceBuffer.withUnsafeMutableBufferPointer<A>((Swift.UnsafeMutableBufferPointer<A>) throws -> A1) throws -> A1' to 'Swift._SliceBuffer.__abi_withUnsafeMutableBufferPointer<A>((Swift.UnsafeMutableBufferPointer<A>) throws -> A1) throws -> A1'
819+
797820
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)

0 commit comments

Comments
 (0)