@@ -28,39 +28,67 @@ ABI stabilization.
28
28
** ABI TODO** : Any exported C++ symbols are implementation details that are not
29
29
intended to be part of the stable runtime interface.
30
30
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
49
49
50
50
** ABI TODO** : These functions are implementation details of the standard
51
51
library ` reflect ` interface. They will be superseded by a low-level
52
52
runtime reflection API.
53
53
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
+
54
68
## Memory allocation
55
69
56
70
### TODO
57
71
58
72
```
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
59
88
```
60
89
61
90
## Reference counting
62
91
63
-
64
92
### swift\_ retainCount
65
93
66
94
```
@@ -126,6 +154,16 @@ internalized.
126
154
000000000001d8b0 T _swift_weakTakeAssign
127
155
000000000001d800 T _swift_weakTakeInit
128
156
000000000001d710 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
129
167
```
130
168
131
169
** ABI TODO** : ` _unsynchronized ` r/r entry points
@@ -167,35 +205,25 @@ between `ErrorType` and `NSError`.
167
205
** ABI TODO** : These should be implemented as shims or in Swift code, not
168
206
in the runtime.
169
207
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
171
225
172
226
```
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
199
227
0000000000001470 T _swift_dynamicCast
200
228
0000000000000a60 T _swift_dynamicCastClass
201
229
0000000000000ae0 T _swift_dynamicCastClassUnconditional
@@ -217,69 +245,134 @@ in the runtime.
217
245
00000000000287d0 T _swift_dynamicCastTypeToObjCProtocolUnconditional
218
246
0000000000000de0 T _swift_dynamicCastUnknownClass
219
247
0000000000000fd0 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
220
277
00000000000039c0 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
222
289
000000000001c560 T _swift_getEnumCaseMultiPayload
223
290
000000000001be60 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
+ ```
224
305
0000000000023230 T _swift_getExistentialMetatypeMetadata
225
306
0000000000023630 T _swift_getExistentialTypeMetadata
226
307
0000000000023b90 T _swift_getForeignTypeMetadata
227
308
000000000001ef30 T _swift_getFunctionTypeMetadata
228
309
000000000001eed0 T _swift_getFunctionTypeMetadata1
229
310
000000000001f1f0 T _swift_getFunctionTypeMetadata2
230
311
000000000001f250 T _swift_getFunctionTypeMetadata3
231
- 0000000000028c40 T _swift_getGenericClassObjCName
232
312
000000000001e940 T _swift_getGenericMetadata
233
313
000000000001e9c0 T _swift_getGenericMetadata1
234
314
000000000001ea60 T _swift_getGenericMetadata2
235
315
000000000001eb00 T _swift_getGenericMetadata3
236
316
000000000001eba0 T _swift_getGenericMetadata4
237
- 0000000000028bc0 T _swift_getInitializedObjCClass
238
317
0000000000022fd0 T _swift_getMetatypeMetadata
239
318
000000000001ec50 T _swift_getObjCClassMetadata
240
- 0000000000022fb0 T _swift_getObjectType
241
319
000000000001e6b0 T _swift_getResilientMetadata
242
320
0000000000022260 T _swift_getTupleTypeMetadata
243
321
00000000000225a0 T _swift_getTupleTypeMetadata2
244
322
00000000000225d0 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
246
336
0000000000022be0 T _swift_initClassMetadata_UniversalStrategy
247
337
000000000001c100 T _swift_initEnumMetadataMultiPayload
248
338
000000000001bd60 T _swift_initEnumValueWitnessTableSinglePayload
249
- 000000000001ca00 T _swift_initStackObject
250
339
0000000000022a20 T _swift_initStructMetadata_UniversalStrategy
251
340
0000000000024230 T _swift_initializeSuperclass
252
341
0000000000028b60 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
267
348
0000000000028770 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
+ ```
270
364
0000000000002ef0 T _swift_registerProtocolConformances
365
+ 0000000000003060 T _swift_conformsToProtocol
366
+ ```
367
+
368
+ ## Error reporting
369
+
370
+ ```
271
371
000000000001c7d0 T _swift_reportFatalError
272
372
000000000001c730 T _swift_reportFatalErrorInFile
273
373
000000000001c940 T _swift_reportMissingMethod
274
374
000000000001c8d0 T _swift_reportUnimplementedInitializer
275
375
000000000001c840 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
283
376
```
284
377
285
378
## Tasks
@@ -293,4 +386,4 @@ in the runtime.
293
386
294
387
- Unsynchronized retain/release
295
388
296
-
389
+ - Decouple dynamic casting and reflection from the standard library
0 commit comments