@@ -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,17 @@ 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
+ @inlinable
179
180
public func _bridgeAnyObjectToAny( _ possiblyNullObject: AnyObject ? ) -> Any {
180
181
if let nonnullObject = possiblyNullObject {
181
182
return nonnullObject // AnyObject-in-Any
@@ -194,7 +195,7 @@ public func _bridgeAnyObjectToAny(_ possiblyNullObject: AnyObject?) -> Any {
194
195
/// or a subclass of it, trap;
195
196
/// + otherwise, returns the result of `T._forceBridgeFromObjectiveC(x)`;
196
197
/// - otherwise, trap.
197
- @inlinable // FIXME(sil-serialize-all)
198
+ @inlinable
198
199
public func _forceBridgeFromObjectiveC< T> ( _ x: AnyObject , _: T . Type ) -> T {
199
200
if _fastPath ( _isClassOrObjCExistential ( T . self) ) {
200
201
return x as! T
@@ -207,8 +208,8 @@ public func _forceBridgeFromObjectiveC<T>(_ x: AnyObject, _: T.Type) -> T {
207
208
208
209
/// Convert `x` from its Objective-C representation to its Swift
209
210
/// representation.
210
- /// COMPILER_INTRINSIC
211
- @inlinable // FIXME(sil-serialize-all)
211
+ // COMPILER_INTRINSIC
212
+ @inlinable
212
213
public func _forceBridgeFromObjectiveC_bridgeable< T: _ObjectiveCBridgeable > (
213
214
_ x: T . _ObjectiveCType ,
214
215
_: T . Type
@@ -230,7 +231,7 @@ public func _forceBridgeFromObjectiveC_bridgeable<T:_ObjectiveCBridgeable> (
230
231
/// + otherwise, returns the result of
231
232
/// `T._conditionallyBridgeFromObjectiveC(x)`;
232
233
/// - otherwise, the result is empty.
233
- @inlinable // FIXME(sil-serialize-all)
234
+ @inlinable
234
235
public func _conditionallyBridgeFromObjectiveC< T> (
235
236
_ x: AnyObject ,
236
237
_: T . Type
@@ -246,8 +247,8 @@ public func _conditionallyBridgeFromObjectiveC<T>(
246
247
247
248
/// Attempt to convert `x` from its Objective-C representation to its Swift
248
249
/// representation.
249
- /// COMPILER_INTRINSIC
250
- @inlinable // FIXME(sil-serialize-all)
250
+ // COMPILER_INTRINSIC
251
+ @inlinable
251
252
public func _conditionallyBridgeFromObjectiveC_bridgeable< T: _ObjectiveCBridgeable > (
252
253
_ x: T . _ObjectiveCType ,
253
254
_: T . Type
@@ -258,7 +259,8 @@ public func _conditionallyBridgeFromObjectiveC_bridgeable<T:_ObjectiveCBridgeabl
258
259
}
259
260
260
261
@_silgen_name ( " " )
261
- public func _bridgeNonVerbatimFromObjectiveC< T> (
262
+ @usableFromInline
263
+ internal func _bridgeNonVerbatimFromObjectiveC< T> (
262
264
_ x: AnyObject ,
263
265
_ nativeType: T . Type ,
264
266
_ result: inout T ?
@@ -558,8 +560,8 @@ public func _getObjCTypeEncoding<T>(_ type: T.Type) -> UnsafePointer<Int8> {
558
560
559
561
/// Convert `x` from its Objective-C representation to its Swift
560
562
/// representation.
561
- /// COMPILER_INTRINSIC
562
- @inlinable // FIXME(sil-serialize-all)
563
+ // COMPILER_INTRINSIC
564
+ @inlinable
563
565
public func _forceBridgeFromObjectiveC_bridgeable< T: _ObjectiveCBridgeable > (
564
566
_ x: T . _ObjectiveCType ,
565
567
_: T . Type
@@ -571,8 +573,8 @@ public func _forceBridgeFromObjectiveC_bridgeable<T:_ObjectiveCBridgeable> (
571
573
572
574
/// Attempt to convert `x` from its Objective-C representation to its Swift
573
575
/// representation.
574
- /// COMPILER_INTRINSIC
575
- @inlinable // FIXME(sil-serialize-all)
576
+ // COMPILER_INTRINSIC
577
+ @inlinable
576
578
public func _conditionallyBridgeFromObjectiveC_bridgeable< T: _ObjectiveCBridgeable > (
577
579
_ x: T . _ObjectiveCType ,
578
580
_: T . Type
@@ -692,7 +694,7 @@ func _makeSwiftValue(_ value: Any) -> AnyObject {
692
694
/// that is `id`-compatible and dynamically castable back to the type of
693
695
/// the boxed value, but is otherwise opaque.
694
696
///
695
- /// COMPILER_INTRINSIC
697
+ // COMPILER_INTRINSIC
696
698
public func _bridgeAnythingToObjectiveC< T> ( _ x: T ) -> AnyObject {
697
699
var done = false
698
700
var result : AnyObject !
0 commit comments