@@ -139,7 +139,7 @@ public struct _BridgeableMetatype: _ObjectiveCBridgeable {
139
139
140
140
//===--- Bridging facilities written in Objective-C -----------------------===//
141
141
// Functions that must discover and possibly use an arbitrary type's
142
- // conformance to a given protocol. See ../runtime/Metadata .cpp for
142
+ // conformance to a given protocol. See ../runtime/Casting .cpp for
143
143
// implementations.
144
144
//===----------------------------------------------------------------------===//
145
145
@@ -156,8 +156,8 @@ public struct _BridgeableMetatype: _ObjectiveCBridgeable {
156
156
/// that is `id`-compatible and dynamically castable back to the type of
157
157
/// the boxed value, but is otherwise opaque.
158
158
///
159
- /// COMPILER_INTRINSIC
160
- @inlinable // FIXME(sil-serialize-all)
159
+ // COMPILER_INTRINSIC
160
+ @inlinable
161
161
public func _bridgeAnythingToObjectiveC< T> ( _ x: T ) -> AnyObject {
162
162
if _fastPath ( _isClassOrObjCExistential ( T . self) ) {
163
163
return unsafeBitCast ( x, to: AnyObject . self)
@@ -166,16 +166,16 @@ public func _bridgeAnythingToObjectiveC<T>(_ x: T) -> AnyObject {
166
166
}
167
167
168
168
@_silgen_name ( " " )
169
- public func _bridgeAnythingNonVerbatimToObjectiveC< T> ( _ x: __owned T) -> AnyObject
169
+ public // @testable
170
+ func _bridgeAnythingNonVerbatimToObjectiveC< T> ( _ x: __owned T) -> AnyObject
170
171
171
172
/// Convert a purportedly-nonnull `id` value from Objective-C into an Any.
172
173
///
173
174
/// Since Objective-C APIs sometimes get their nullability annotations wrong,
174
175
/// this includes a failsafe against nil `AnyObject`s, wrapping them up as
175
176
/// a nil `AnyObject?`-inside-an-`Any`.
176
177
///
177
- /// COMPILER_INTRINSIC
178
- @inlinable // FIXME(sil-serialize-all)
178
+ // COMPILER_INTRINSIC
179
179
public func _bridgeAnyObjectToAny( _ possiblyNullObject: AnyObject ? ) -> Any {
180
180
if let nonnullObject = possiblyNullObject {
181
181
return nonnullObject // AnyObject-in-Any
@@ -194,7 +194,7 @@ public func _bridgeAnyObjectToAny(_ possiblyNullObject: AnyObject?) -> Any {
194
194
/// or a subclass of it, trap;
195
195
/// + otherwise, returns the result of `T._forceBridgeFromObjectiveC(x)`;
196
196
/// - otherwise, trap.
197
- @inlinable // FIXME(sil-serialize-all)
197
+ @inlinable
198
198
public func _forceBridgeFromObjectiveC< T> ( _ x: AnyObject , _: T . Type ) -> T {
199
199
if _fastPath ( _isClassOrObjCExistential ( T . self) ) {
200
200
return x as! T
@@ -207,8 +207,8 @@ public func _forceBridgeFromObjectiveC<T>(_ x: AnyObject, _: T.Type) -> T {
207
207
208
208
/// Convert `x` from its Objective-C representation to its Swift
209
209
/// representation.
210
- /// COMPILER_INTRINSIC
211
- @inlinable // FIXME(sil-serialize-all)
210
+ // COMPILER_INTRINSIC
211
+ @inlinable
212
212
public func _forceBridgeFromObjectiveC_bridgeable< T: _ObjectiveCBridgeable > (
213
213
_ x: T . _ObjectiveCType ,
214
214
_: T . Type
@@ -230,7 +230,7 @@ public func _forceBridgeFromObjectiveC_bridgeable<T:_ObjectiveCBridgeable> (
230
230
/// + otherwise, returns the result of
231
231
/// `T._conditionallyBridgeFromObjectiveC(x)`;
232
232
/// - otherwise, the result is empty.
233
- @inlinable // FIXME(sil-serialize-all)
233
+ @inlinable
234
234
public func _conditionallyBridgeFromObjectiveC< T> (
235
235
_ x: AnyObject ,
236
236
_: T . Type
@@ -246,8 +246,8 @@ public func _conditionallyBridgeFromObjectiveC<T>(
246
246
247
247
/// Attempt to convert `x` from its Objective-C representation to its Swift
248
248
/// representation.
249
- /// COMPILER_INTRINSIC
250
- @inlinable // FIXME(sil-serialize-all)
249
+ // COMPILER_INTRINSIC
250
+ @inlinable
251
251
public func _conditionallyBridgeFromObjectiveC_bridgeable< T: _ObjectiveCBridgeable > (
252
252
_ x: T . _ObjectiveCType ,
253
253
_: T . Type
@@ -258,7 +258,8 @@ public func _conditionallyBridgeFromObjectiveC_bridgeable<T:_ObjectiveCBridgeabl
258
258
}
259
259
260
260
@_silgen_name ( " " )
261
- public func _bridgeNonVerbatimFromObjectiveC< T> (
261
+ @usableFromInline
262
+ internal func _bridgeNonVerbatimFromObjectiveC< T> (
262
263
_ x: AnyObject ,
263
264
_ nativeType: T . Type ,
264
265
_ result: inout T ?
@@ -558,8 +559,8 @@ public func _getObjCTypeEncoding<T>(_ type: T.Type) -> UnsafePointer<Int8> {
558
559
559
560
/// Convert `x` from its Objective-C representation to its Swift
560
561
/// representation.
561
- /// COMPILER_INTRINSIC
562
- @inlinable // FIXME(sil-serialize-all)
562
+ // COMPILER_INTRINSIC
563
+ @inlinable
563
564
public func _forceBridgeFromObjectiveC_bridgeable< T: _ObjectiveCBridgeable > (
564
565
_ x: T . _ObjectiveCType ,
565
566
_: T . Type
@@ -571,8 +572,8 @@ public func _forceBridgeFromObjectiveC_bridgeable<T:_ObjectiveCBridgeable> (
571
572
572
573
/// Attempt to convert `x` from its Objective-C representation to its Swift
573
574
/// representation.
574
- /// COMPILER_INTRINSIC
575
- @inlinable // FIXME(sil-serialize-all)
575
+ // COMPILER_INTRINSIC
576
+ @inlinable
576
577
public func _conditionallyBridgeFromObjectiveC_bridgeable< T: _ObjectiveCBridgeable > (
577
578
_ x: T . _ObjectiveCType ,
578
579
_: T . Type
@@ -692,7 +693,7 @@ func _makeSwiftValue(_ value: Any) -> AnyObject {
692
693
/// that is `id`-compatible and dynamically castable back to the type of
693
694
/// the boxed value, but is otherwise opaque.
694
695
///
695
- /// COMPILER_INTRINSIC
696
+ // COMPILER_INTRINSIC
696
697
public func _bridgeAnythingToObjectiveC< T> ( _ x: T ) -> AnyObject {
697
698
var done = false
698
699
var result : AnyObject !
0 commit comments