@@ -28,39 +28,67 @@ ABI stabilization.
2828** ABI TODO** : Any exported C++ symbols are implementation details that are not
2929intended to be part of the stable runtime interface.
3030
31- ### ` _swift_ClassMirror_count `
32- ### ` _swift_ClassMirror_quickLookObject `
33- ### ` _swift_ClassMirror_subscript `
34- ### ` _swift_EnumMirror_caseName `
35- ### ` _swift_EnumMirror_count `
36- ### ` _swift_EnumMirror_subscript `
37- ### ` _swift_MagicMirrorData_objcValue `
38- ### ` _swift_MagicMirrorData_objcValueType `
39- ### ` _swift_MagicMirrorData_summary `
40- ### ` _swift_MagicMirrorData_value `
41- ### ` _swift_MagicMirrorData_valueType `
42- ### ` _swift_ObjCMirror_count `
43- ### ` _swift_ObjCMirror_subscript `
44- ### ` _swift_StructMirror_count `
45- ### ` _swift_StructMirror_subscript `
46- ### ` _swift_TupleMirror_count `
47- ### ` _swift_TupleMirror_subscript `
48- ### ` _swift_reflectAny `
31+ ### swift \_ ClassMirror \_ count
32+ ### swift \_ ClassMirror \_ quickLookObject
33+ ### swift \_ ClassMirror \_ subscript
34+ ### swift \_ EnumMirror \_ caseName
35+ ### swift \_ EnumMirror \_ count
36+ ### swift \_ EnumMirror \_ subscript
37+ ### swift \_ MagicMirrorData \_ objcValue
38+ ### swift \_ MagicMirrorData \_ objcValueType
39+ ### swift \_ MagicMirrorData \_ summary
40+ ### swift \_ MagicMirrorData \_ value
41+ ### swift \_ MagicMirrorData \_ valueType
42+ ### swift \_ ObjCMirror \_ count
43+ ### swift \_ ObjCMirror \_ subscript
44+ ### swift \_ StructMirror \_ count
45+ ### swift \_ StructMirror \_ subscript
46+ ### swift \_ TupleMirror \_ count
47+ ### swift \_ TupleMirror \_ subscript
48+ ### swift \_ reflectAny
4949
5050** ABI TODO** : These functions are implementation details of the standard
5151library ` reflect ` interface. They will be superseded by a low-level
5252runtime reflection API.
5353
54+ ### swift\_ stdlib\_ demangleName
55+
56+ ```
57+ @convention(thin) (string: UnsafePointer<UInt8>,
58+ length: UInt,
59+ @out String) -> ()
60+ ```
61+
62+ Given a pointer to a Swift mangled symbol name as a byte string of ` length `
63+ characters, returns the demangled name as a ` Swift.String ` .
64+
65+ ** ABI TODO** : Decouple from the standard library ` Swift.String ` implementation.
66+ Rename with a non-` stdlib ` naming scheme.
67+
5468## Memory allocation
5569
5670### TODO
5771
5872```
73+ 000000000001cb30 T _swift_allocBox
74+ 000000000001c990 T _swift_allocObject
75+ 000000000001ca60 T _swift_bufferAllocate
76+ 000000000001ca70 T _swift_bufferAllocateOnStack
77+ 000000000001ca80 T _swift_bufferDeallocateFromStack
78+ 000000000001ca90 T _swift_bufferHeaderSize
79+ 000000000001cd30 T _swift_deallocBox
80+ 000000000001d490 T _swift_deallocClassInstance
81+ 000000000001cd60 T _swift_deallocObject
82+ 000000000001d4c0 T _swift_deallocPartialClassInstance
83+ 000000000001d400 T _swift_rootObjCDealloc
84+ 000000000001c960 T _swift_slowAlloc
85+ 000000000001c980 T _swift_slowDealloc
86+ 000000000001ce10 T _swift_projectBox
87+ 000000000001ca00 T _swift_initStackObject
5988```
6089
6190## Reference counting
6291
63-
6492### swift\_ retainCount
6593
6694```
@@ -126,6 +154,16 @@ internalized.
126154000000000001d8b0 T _swift_weakTakeAssign
127155000000000001d800 T _swift_weakTakeInit
128156000000000001d710 T _swift_weakTakeStrong
157+ 000000000002afe0 T _swift_isUniquelyReferencedNonObjC
158+ 000000000002af50 T _swift_isUniquelyReferencedNonObjC_nonNull
159+ 000000000002b060 T _swift_isUniquelyReferencedNonObjC_nonNull_bridgeObject
160+ 000000000002b200 T _swift_isUniquelyReferencedOrPinnedNonObjC_nonNull
161+ 000000000002b130 T _swift_isUniquelyReferencedOrPinnedNonObjC_nonNull_bridgeObject
162+ 000000000002b2f0 T _swift_isUniquelyReferencedOrPinned_native
163+ 000000000002b290 T _swift_isUniquelyReferencedOrPinned_nonNull_native
164+ 000000000002af00 T _swift_isUniquelyReferenced_native
165+ 000000000002aea0 T _swift_isUniquelyReferenced_nonNull_native
166+ 000000000001d280 T _swift_isDeallocating
129167```
130168
131169** ABI TODO** : ` _unsynchronized ` r/r entry points
@@ -167,35 +205,25 @@ between `ErrorType` and `NSError`.
167205** ABI TODO** : These should be implemented as shims or in Swift code, not
168206in the runtime.
169207
170- ## TODO
208+ ## Initialization
209+
210+ ### swift_once
211+
212+ ```
213+ @convention(thin) (Builtin.RawPointer, @convention(thin) () -> ()) -> ()
214+ ```
215+
216+ Used to lazily initialize global variables. The first parameter must
217+ point to a word-sized memory location that was initialized to zero at
218+ process start. It is undefined behavior to reference memory that has
219+ been initialized to something other than zero or written to by anything other
220+ than ` swift_once ` in the current process's lifetime. The function referenced by
221+ the second parameter will have been run exactly once in the time between
222+ process start and the function returns.
223+
224+ ## Dynamic casting
171225
172226```
173- 000000000002b340 T __swift_class_getInstancePositiveExtentSize
174- 000000000002b350 T __swift_class_getInstancePositiveExtentSize_native
175- 0000000000024040 T __swift_debug_verifyTypeLayoutAttribute
176- 0000000000004080 T __swift_getSuperclass_nonNull
177- 0000000000003ff0 T __swift_isClass
178- 00000000000279f0 T __swift_usesNativeSwiftReferenceCounting_class
179- 000000000002ae40 T __swift_usesNativeSwiftReferenceCounting_nonNull
180- 000000000001cb30 T _swift_allocBox
181- 000000000001c990 T _swift_allocObject
182- 000000000001e3e0 T _swift_allocateGenericClassMetadata
183- 000000000001e620 T _swift_allocateGenericValueMetadata
184- 0000000000023a40 T _swift_assignExistentialWithCopy
185- 0000000000003b60 T _swift_bridgeNonVerbatimFromObjectiveC
186- 0000000000003c80 T _swift_bridgeNonVerbatimFromObjectiveCConditional
187- 00000000000037e0 T _swift_bridgeNonVerbatimToObjectiveC
188- 000000000001ca60 T _swift_bufferAllocate
189- 000000000001ca70 T _swift_bufferAllocateOnStack
190- 000000000001ca80 T _swift_bufferDeallocateFromStack
191- 000000000001ca90 T _swift_bufferHeaderSize
192- 0000000000003060 T _swift_conformsToProtocol
193- 000000000001dbf0 T _swift_copyPOD
194- 000000000001cd30 T _swift_deallocBox
195- 000000000001d490 T _swift_deallocClassInstance
196- 000000000001cd60 T _swift_deallocObject
197- 000000000001d4c0 T _swift_deallocPartialClassInstance
198- 0000000000023e60 T _swift_demangleSimpleClass
1992270000000000001470 T _swift_dynamicCast
2002280000000000000a60 T _swift_dynamicCastClass
2012290000000000000ae0 T _swift_dynamicCastClassUnconditional
@@ -217,69 +245,134 @@ in the runtime.
21724500000000000287d0 T _swift_dynamicCastTypeToObjCProtocolUnconditional
2182460000000000000de0 T _swift_dynamicCastUnknownClass
2192470000000000000fd0 T _swift_dynamicCastUnknownClassUnconditional
248+ 0000000000003f50 T _swift_isClassOrObjCExistential
249+ 00000000000040c0 T _swift_isClassType
250+ 0000000000004130 T _swift_isOptionalType
251+ 0000000000004080 T __swift_getSuperclass_nonNull
252+ 0000000000003ff0 T __swift_isClass
253+ 00000000000279f0 T __swift_usesNativeSwiftReferenceCounting_class
254+ 000000000002ae40 T __swift_usesNativeSwiftReferenceCounting_nonNull
255+ ```
256+
257+ ## Debugging
258+
259+ ```
260+ 000000000002b340 T __swift_class_getInstancePositiveExtentSize
261+ 000000000002b350 T __swift_class_getInstancePositiveExtentSize_native
262+ 0000000000024040 T __swift_debug_verifyTypeLayoutAttribute
263+ 0000000000027140 T _swift_willThrow
264+ ```
265+
266+ ## Objective-C Bridging
267+
268+ ** ObjC-only** .
269+
270+ ** ABI TODO** : Decouple from the runtime as much as possible. Much of this
271+ should be implementable in the standard library now.
272+
273+ ```
274+ 0000000000003b60 T _swift_bridgeNonVerbatimFromObjectiveC
275+ 0000000000003c80 T _swift_bridgeNonVerbatimFromObjectiveCConditional
276+ 00000000000037e0 T _swift_bridgeNonVerbatimToObjectiveC
22027700000000000039c0 T _swift_getBridgedNonVerbatimObjectiveCType
221- 0000000000000b60 T _swift_getDynamicType
278+ 0000000000003d90 T _swift_isBridgedNonVerbatimToObjectiveC
279+ ```
280+
281+ ## Code generation
282+
283+ Certain common code paths are implemented in the runtime as a code size
284+ optimization.
285+
286+ ```
287+ 0000000000023a40 T _swift_assignExistentialWithCopy
288+ 000000000001dbf0 T _swift_copyPOD
222289000000000001c560 T _swift_getEnumCaseMultiPayload
223290000000000001be60 T _swift_getEnumCaseSinglePayload
291+ 000000000001c400 T _swift_storeEnumTagMultiPayload
292+ 000000000001bf90 T _swift_storeEnumTagSinglePayload
293+ ```
294+ ## Type metadata lookup
295+
296+ These functions look up metadata for types that potentially require runtime
297+ instantiation or initialization, including structural types, generics, classes,
298+ and metadata for imported C and Objective-C types.
299+
300+ ** ABI TODO** : Instantiation APIs under flux as part of resilience work. For
301+ nominal types, ` getGenericMetadata ` is likely to become an implementation
302+ detail used to implement resilient per-type metadata accessor functions.
303+
304+ ```
2243050000000000023230 T _swift_getExistentialMetatypeMetadata
2253060000000000023630 T _swift_getExistentialTypeMetadata
2263070000000000023b90 T _swift_getForeignTypeMetadata
227308000000000001ef30 T _swift_getFunctionTypeMetadata
228309000000000001eed0 T _swift_getFunctionTypeMetadata1
229310000000000001f1f0 T _swift_getFunctionTypeMetadata2
230311000000000001f250 T _swift_getFunctionTypeMetadata3
231- 0000000000028c40 T _swift_getGenericClassObjCName
232312000000000001e940 T _swift_getGenericMetadata
233313000000000001e9c0 T _swift_getGenericMetadata1
234314000000000001ea60 T _swift_getGenericMetadata2
235315000000000001eb00 T _swift_getGenericMetadata3
236316000000000001eba0 T _swift_getGenericMetadata4
237- 0000000000028bc0 T _swift_getInitializedObjCClass
2383170000000000022fd0 T _swift_getMetatypeMetadata
239318000000000001ec50 T _swift_getObjCClassMetadata
240- 0000000000022fb0 T _swift_getObjectType
241319000000000001e6b0 T _swift_getResilientMetadata
2423200000000000022260 T _swift_getTupleTypeMetadata
24332100000000000225a0 T _swift_getTupleTypeMetadata2
24432200000000000225d0 T _swift_getTupleTypeMetadata3
245- 00000000000006f0 T _swift_getTypeName
323+ 0000000000028bc0 T _swift_getInitializedObjCClass
324+ ```
325+
326+ ## Type metadata initialization
327+
328+ Calls to these entry points are emitted when instantiating type metadata at
329+ runtime.
330+
331+ ** ABI TODO** : Initialization APIs under flux as part of resilience work.
332+
333+ ```
334+ 000000000001e3e0 T _swift_allocateGenericClassMetadata
335+ 000000000001e620 T _swift_allocateGenericValueMetadata
2463360000000000022be0 T _swift_initClassMetadata_UniversalStrategy
247337000000000001c100 T _swift_initEnumMetadataMultiPayload
248338000000000001bd60 T _swift_initEnumValueWitnessTableSinglePayload
249- 000000000001ca00 T _swift_initStackObject
2503390000000000022a20 T _swift_initStructMetadata_UniversalStrategy
2513400000000000024230 T _swift_initializeSuperclass
2523410000000000028b60 T _swift_instantiateObjCClass
253- 0000000000003d90 T _swift_isBridgedNonVerbatimToObjectiveC
254- 0000000000003f50 T _swift_isClassOrObjCExistential
255- 00000000000040c0 T _swift_isClassType
256- 000000000001d280 T _swift_isDeallocating
257- 0000000000004130 T _swift_isOptionalType
258- 000000000002afe0 T _swift_isUniquelyReferencedNonObjC
259- 000000000002af50 T _swift_isUniquelyReferencedNonObjC_nonNull
260- 000000000002b060 T _swift_isUniquelyReferencedNonObjC_nonNull_bridgeObject
261- 000000000002b200 T _swift_isUniquelyReferencedOrPinnedNonObjC_nonNull
262- 000000000002b130 T _swift_isUniquelyReferencedOrPinnedNonObjC_nonNull_bridgeObject
263- 000000000002b2f0 T _swift_isUniquelyReferencedOrPinned_native
264- 000000000002b290 T _swift_isUniquelyReferencedOrPinned_nonNull_native
265- 000000000002af00 T _swift_isUniquelyReferenced_native
266- 000000000002aea0 T _swift_isUniquelyReferenced_nonNull_native
342+ ```
343+
344+ ## Objective-C Runtime Interop
345+
346+ ```
347+ 0000000000023e60 T _swift_demangleSimpleClass
2673480000000000028770 T _swift_objcRespondsToSelector
268- 0000000000026550 T _swift_once
269- 000000000001ce10 T _swift_projectBox
349+ ```
350+
351+ ## Metatypes
352+
353+ ```
354+ 0000000000000b60 T _swift_getDynamicType
355+ 0000000000022fb0 T _swift_getObjectType
356+ 00000000000006f0 T _swift_getTypeName
357+ ```
358+
359+ ** ABI TODO** : getTypeByName entry point.
360+
361+ ## Protocol conformance lookup
362+
363+ ```
2703640000000000002ef0 T _swift_registerProtocolConformances
365+ 0000000000003060 T _swift_conformsToProtocol
366+ ```
367+
368+ ## Error reporting
369+
370+ ```
271371000000000001c7d0 T _swift_reportFatalError
272372000000000001c730 T _swift_reportFatalErrorInFile
273373000000000001c940 T _swift_reportMissingMethod
274374000000000001c8d0 T _swift_reportUnimplementedInitializer
275375000000000001c840 T _swift_reportUnimplementedInitializerInFile
276- 000000000001d400 T _swift_rootObjCDealloc
277- 000000000001c960 T _swift_slowAlloc
278- 000000000001c980 T _swift_slowDealloc
279- 0000000000033930 T _swift_stdlib_demangleName
280- 000000000001c400 T _swift_storeEnumTagMultiPayload
281- 000000000001bf90 T _swift_storeEnumTagSinglePayload
282- 0000000000027140 T _swift_willThrow
283376```
284377
285378## Tasks
@@ -293,4 +386,4 @@ in the runtime.
293386
294387- Unsynchronized retain/release
295388
296-
389+ - Decouple dynamic casting and reflection from the standard library
0 commit comments