@@ -172,7 +172,13 @@ explicit String(NSString *s)
172
172
#pragma clang diagnostic push
173
173
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
174
174
175
-
175
+ // struct _MagicMirrorData {
176
+ // internal var value: Any {
177
+ // @_silgen_name("swift_MagicMirrorData_value")get
178
+ // }
179
+ // }
180
+ //
181
+ // Since this is a method, owner is passed in at +0.
176
182
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
177
183
AnyReturn swift_MagicMirrorData_value(HeapObject *owner,
178
184
const OpaqueValue *value,
@@ -186,6 +192,14 @@ AnyReturn swift_MagicMirrorData_value(HeapObject *owner,
186
192
187
193
return AnyReturn (result);
188
194
}
195
+
196
+ // struct _MagicMirrorData {
197
+ // internal var valueType: Any.Type {
198
+ // @_silgen_name("swift_MagicMirrorData_valueType")get
199
+ // }
200
+ // }
201
+ //
202
+ // Since this is a method, owner is passed in at +0.
189
203
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
190
204
const Metadata *swift_MagicMirrorData_valueType(HeapObject *owner,
191
205
const OpaqueValue *value,
@@ -195,6 +209,14 @@ AnyReturn swift_MagicMirrorData_value(HeapObject *owner,
195
209
}
196
210
197
211
#if SWIFT_OBJC_INTEROP
212
+
213
+ // struct _MagicMirrorData {
214
+ // public var objcValue: Any {
215
+ // @_silgen_name("swift_MagicMirrorData_objcValue")get
216
+ // }
217
+ // }
218
+ //
219
+ // Since this is a method, owner is at +0.
198
220
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
199
221
AnyReturn swift_MagicMirrorData_objcValue(HeapObject *owner,
200
222
const OpaqueValue *value,
@@ -295,6 +317,13 @@ void swift_MagicMirrorData_summary(const Metadata *T, String *result) {
295
317
}
296
318
}
297
319
320
+ // struct _MagicMirrorData {
321
+ // public var objcValueType: Any.Type {
322
+ // @_silgen_name("swift_MagicMirrorData_objcValueType")get
323
+ // }
324
+ // }
325
+ //
326
+ // This is a method, so owner is at +0.
298
327
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
299
328
const Metadata *swift_MagicMirrorData_objcValueType(HeapObject *owner,
300
329
const OpaqueValue *value,
@@ -351,6 +380,9 @@ static Mirror reflect(HeapObject *owner,
351
380
352
381
// -- Tuple destructuring.
353
382
383
+ // internal func _getTupleCount(_: _MagicMirrorData) -> Int
384
+ //
385
+ // This is a free standing function, not a method.
354
386
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
355
387
intptr_t swift_TupleMirror_count(HeapObject *owner,
356
388
const OpaqueValue *value,
@@ -360,6 +392,10 @@ intptr_t swift_TupleMirror_count(HeapObject *owner,
360
392
return Tuple->NumElements ;
361
393
}
362
394
395
+ // / internal func _getTupleChild<T>(_: Int, _: _MagicMirrorData) -> (T, _Mirror)
396
+ // /
397
+ // / This is a free standing function, not a method.
398
+ // /
363
399
// / \param owner passed at +1, consumed.
364
400
// / \param value passed unowned.
365
401
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
@@ -489,6 +525,9 @@ static bool loadSpecialReferenceStorage(HeapObject *owner,
489
525
490
526
// -- Struct destructuring.
491
527
528
+ // internal func _getStructCount(_: _MagicMirrorData) -> Int
529
+ //
530
+ // This is a free standing function, not a method.
492
531
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
493
532
intptr_t swift_StructMirror_count(HeapObject *owner,
494
533
const OpaqueValue *value,
@@ -498,6 +537,9 @@ intptr_t swift_StructMirror_count(HeapObject *owner,
498
537
return Struct->Description ->Struct .NumFields ;
499
538
}
500
539
540
+ // internal func _getStructChild<T>(_: Int, _: _MagicMirrorData) -> (T, _Mirror)
541
+ //
542
+ // This is a free standing function, not a method.
501
543
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
502
544
void swift_StructMirror_subscript(String *outString,
503
545
Mirror *outMirror,
@@ -524,6 +566,7 @@ void swift_StructMirror_subscript(String *outString,
524
566
525
567
assert (!fieldType.isIndirect () && " indirect struct fields not implemented" );
526
568
569
+ // This only consumed owner if we succeed.
527
570
if (loadSpecialReferenceStorage (owner, fieldData, fieldType, outMirror))
528
571
return ;
529
572
@@ -576,6 +619,10 @@ static void getEnumMirrorInfo(const OpaqueValue *value,
576
619
*indirectPtr = indirect;
577
620
}
578
621
622
+ // internal func _swift_EnumMirror_caseName(
623
+ // _ data: _MagicMirrorData) -> UnsafePointer<CChar>
624
+ //
625
+ // This is a free standing function.
579
626
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
580
627
const char *swift_EnumMirror_caseName(HeapObject *owner,
581
628
const OpaqueValue *value,
@@ -596,6 +643,9 @@ static void getEnumMirrorInfo(const OpaqueValue *value,
596
643
return getFieldName (Description.CaseNames , tag);
597
644
}
598
645
646
+ // internal func _getEnumCaseName<T>(_ value: T) -> UnsafePointer<CChar>?
647
+ //
648
+ // This is a free standing function, not a method.
599
649
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
600
650
const char *swift_EnumCaseName(OpaqueValue *value, const Metadata *type) {
601
651
// Build a magic mirror. Unconditionally destroy the value at the end.
@@ -622,6 +672,9 @@ static void getEnumMirrorInfo(const OpaqueValue *value,
622
672
return result;
623
673
}
624
674
675
+ // internal func _getEnumCount(_: _MagicMirrorData) -> Int
676
+ //
677
+ // This is a free standing function, not a method.
625
678
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
626
679
intptr_t swift_EnumMirror_count(HeapObject *owner,
627
680
const OpaqueValue *value,
@@ -637,6 +690,9 @@ intptr_t swift_EnumMirror_count(HeapObject *owner,
637
690
return (payloadType != nullptr ) ? 1 : 0 ;
638
691
}
639
692
693
+ // internal func _getEnumChild<T>(_: Int, _: _MagicMirrorData) -> (T, _Mirror)
694
+ //
695
+ // This is a free standing function, not a method.
640
696
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
641
697
void swift_EnumMirror_subscript(String *outString,
642
698
Mirror *outMirror,
@@ -685,6 +741,9 @@ static Mirror getMirrorForSuperclass(const ClassMetadata *sup,
685
741
const OpaqueValue *value,
686
742
const Metadata *type);
687
743
744
+ // internal func _getClassCount(_: _MagicMirrorData) -> Int
745
+ //
746
+ // This is a free standing function, not a method.
688
747
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
689
748
intptr_t swift_ClassMirror_count(HeapObject *owner,
690
749
const OpaqueValue *value,
@@ -701,6 +760,10 @@ intptr_t swift_ClassMirror_count(HeapObject *owner,
701
760
return count;
702
761
}
703
762
763
+ // / internal func _getClassChild<T>(_: Int, _: _MagicMirrorData) -> (T, _Mirror)
764
+ // /
765
+ // / This is a free standing function, not a method.
766
+ // /
704
767
// / \param owner passed at +1, consumed.
705
768
// / \param value passed unowned.
706
769
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_INTERFACE
0 commit comments