@@ -544,31 +544,17 @@ open class _SwiftNativeNSData {
544
544
// Support for reliable testing of the return-autoreleased optimization
545
545
//===----------------------------------------------------------------------===//
546
546
547
- @_fixed_layout // FIXME(sil-serialize-all)
548
- @usableFromInline // FIXME(sil-serialize-all)
549
547
@objc
550
548
internal class _stdlib_ReturnAutoreleasedDummy {
551
- @inlinable // FIXME(sil-serialize-all)
552
549
@objc
553
550
internal init ( ) { }
554
551
555
- @inlinable // FIXME(sil-serialize-all)
556
- deinit { }
557
-
558
552
// Use 'dynamic' to force Objective-C dispatch, which uses the
559
553
// return-autoreleased call sequence.
560
554
@objc
561
555
internal dynamic func returnsAutoreleased( _ x: AnyObject ) -> AnyObject {
562
556
return x
563
557
}
564
-
565
- // Use 'dynamic' to prevent this call to be duplicated into other modules.
566
- @objc
567
- internal dynamic func initializeReturnAutoreleased( ) {
568
- // On x86_64 it is sufficient to perform one cycle of return-autoreleased
569
- // call sequence in order to initialize all required PLT entries.
570
- _ = self . returnsAutoreleased ( self )
571
- }
572
558
}
573
559
574
560
/// This function ensures that the return-autoreleased optimization works.
@@ -583,11 +569,12 @@ internal class _stdlib_ReturnAutoreleasedDummy {
583
569
/// separate for each dylib.
584
570
///
585
571
/// Call this function in a fresh autorelease pool.
586
- @inlinable // FIXME(sil-serialize-all)
587
572
public func _stdlib_initializeReturnAutoreleased( ) {
588
- // _stdlib_initializeReturnAutoreleasedImpl()
589
573
#if arch(x86_64)
590
- _stdlib_ReturnAutoreleasedDummy ( ) . initializeReturnAutoreleased ( )
574
+ // On x86_64 it is sufficient to perform one cycle of return-autoreleased
575
+ // call sequence in order to initialize all required PLT entries.
576
+ let dummy = _stdlib_ReturnAutoreleasedDummy ( )
577
+ _ = dummy. returnsAutoreleased ( dummy)
591
578
#endif
592
579
}
593
580
#else
0 commit comments