Skip to content

Commit 526081c

Browse files
authored
Merge pull request #20039 from airspeedswift/unnninline
2 parents a9ee16e + e8e169c commit 526081c

7 files changed

+76
-90
lines changed

stdlib/public/core/BridgeObjectiveC.swift

-8
Original file line numberDiff line numberDiff line change
@@ -94,32 +94,26 @@ public protocol _ObjectiveCBridgeable {
9494
/// a metatype, make it conform to _ObjectiveCBridgeable, and its witness table
9595
/// will be ABI-compatible with one that directly provided conformance to the
9696
/// metatype type itself.
97-
@_fixed_layout
9897
public struct _BridgeableMetatype: _ObjectiveCBridgeable {
99-
@usableFromInline // FIXME(sil-serialize-all)
10098
internal var value: AnyObject.Type
10199

102-
@inlinable // FIXME(sil-serialize-all)
103100
internal init(value: AnyObject.Type) {
104101
self.value = value
105102
}
106103

107104
public typealias _ObjectiveCType = AnyObject
108105

109-
@inlinable // FIXME(sil-serialize-all)
110106
public func _bridgeToObjectiveC() -> AnyObject {
111107
return value
112108
}
113109

114-
@inlinable // FIXME(sil-serialize-all)
115110
public static func _forceBridgeFromObjectiveC(
116111
_ source: AnyObject,
117112
result: inout _BridgeableMetatype?
118113
) {
119114
result = _BridgeableMetatype(value: source as! AnyObject.Type)
120115
}
121116

122-
@inlinable // FIXME(sil-serialize-all)
123117
public static func _conditionallyBridgeFromObjectiveC(
124118
_ source: AnyObject,
125119
result: inout _BridgeableMetatype?
@@ -133,7 +127,6 @@ public struct _BridgeableMetatype: _ObjectiveCBridgeable {
133127
return false
134128
}
135129

136-
@inlinable // FIXME(sil-serialize-all)
137130
@_effects(readonly)
138131
public static func _unconditionallyBridgeFromObjectiveC(_ source: AnyObject?)
139132
-> _BridgeableMetatype {
@@ -309,7 +302,6 @@ public func _bridgeNonVerbatimFromObjectiveCConditional<T>(
309302
///
310303
/// - If `T` is a class type, returns `true`;
311304
/// - otherwise, returns whether `T` conforms to `_ObjectiveCBridgeable`.
312-
@inlinable // FIXME(sil-serialize-all)
313305
public func _isBridgedToObjectiveC<T>(_: T.Type) -> Bool {
314306
if _fastPath(_isClassOrObjCExistential(T.self)) {
315307
return true

stdlib/public/core/ObjectIdentifier.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
///
1515
/// In Swift, only class instances and metatypes have unique identities. There
1616
/// is no notion of identity for structs, enums, functions, or tuples.
17-
@_fixed_layout // FIXME(sil-serialize-all)
17+
@_fixed_layout // trivial-implementation
1818
public struct ObjectIdentifier {
19-
@usableFromInline // FIXME(sil-serialize-all)
19+
@usableFromInline // trivial-implementation
2020
internal let _value: Builtin.RawPointer
2121

2222
/// Creates an instance that uniquely identifies the given class instance.
@@ -47,15 +47,15 @@ public struct ObjectIdentifier {
4747
/// // Prints "false"
4848
///
4949
/// - Parameter x: An instance of a class.
50-
@inlinable // FIXME(sil-serialize-all)
50+
@inlinable // trivial-implementation
5151
public init(_ x: AnyObject) {
5252
self._value = Builtin.bridgeToRawPointer(x)
5353
}
5454

5555
/// Creates an instance that uniquely identifies the given metatype.
5656
///
5757
/// - Parameter: A metatype.
58-
@inlinable // FIXME(sil-serialize-all)
58+
@inlinable // trivial-implementation
5959
public init(_ x: Any.Type) {
6060
self._value = unsafeBitCast(x, to: Builtin.RawPointer.self)
6161
}
@@ -69,14 +69,14 @@ extension ObjectIdentifier : CustomDebugStringConvertible {
6969
}
7070

7171
extension ObjectIdentifier: Equatable {
72-
@inlinable // FIXME(sil-serialize-all)
72+
@inlinable // trivial-implementation
7373
public static func == (x: ObjectIdentifier, y: ObjectIdentifier) -> Bool {
7474
return Bool(Builtin.cmp_eq_RawPointer(x._value, y._value))
7575
}
7676
}
7777

7878
extension ObjectIdentifier: Comparable {
79-
@inlinable // FIXME(sil-serialize-all)
79+
@inlinable // trivial-implementation
8080
public static func < (lhs: ObjectIdentifier, rhs: ObjectIdentifier) -> Bool {
8181
return UInt(bitPattern: lhs) < UInt(bitPattern: rhs)
8282
}
@@ -97,7 +97,7 @@ extension ObjectIdentifier: Hashable {
9797
extension UInt {
9898
/// Creates an integer that captures the full value of the given object
9999
/// identifier.
100-
@inlinable // FIXME(sil-serialize-all)
100+
@inlinable // trivial-implementation
101101
public init(bitPattern objectID: ObjectIdentifier) {
102102
self.init(Builtin.ptrtoint_Word(objectID._value))
103103
}
@@ -106,7 +106,7 @@ extension UInt {
106106
extension Int {
107107
/// Creates an integer that captures the full value of the given object
108108
/// identifier.
109-
@inlinable // FIXME(sil-serialize-all)
109+
@inlinable // trivial-implementation
110110
public init(bitPattern objectID: ObjectIdentifier) {
111111
self.init(bitPattern: UInt(bitPattern: objectID))
112112
}

stdlib/public/core/Optional.swift

-5
Original file line numberDiff line numberDiff line change
@@ -668,13 +668,11 @@ public func ?? <T>(optional: T?, defaultValue: @autoclosure () throws -> T?)
668668
#if _runtime(_ObjC)
669669
extension Optional : _ObjectiveCBridgeable {
670670
// The object that represents `none` for an Optional of this type.
671-
@inlinable // FIXME(sil-serialize-all)
672671
internal static var _nilSentinel : AnyObject {
673672
@_silgen_name("_swift_Foundation_getOptionalNilSentinelObject")
674673
get
675674
}
676675

677-
@inlinable // FIXME(sil-serialize-all)
678676
public func _bridgeToObjectiveC() -> AnyObject {
679677
// Bridge a wrapped value by unwrapping.
680678
if let value = self {
@@ -684,7 +682,6 @@ extension Optional : _ObjectiveCBridgeable {
684682
return type(of: self)._nilSentinel
685683
}
686684

687-
@inlinable // FIXME(sil-serialize-all)
688685
public static func _forceBridgeFromObjectiveC(
689686
_ source: AnyObject,
690687
result: inout Optional<Wrapped>?
@@ -702,7 +699,6 @@ extension Optional : _ObjectiveCBridgeable {
702699
result = .some(.some(unwrappedResult))
703700
}
704701

705-
@inlinable // FIXME(sil-serialize-all)
706702
public static func _conditionallyBridgeFromObjectiveC(
707703
_ source: AnyObject,
708704
result: inout Optional<Wrapped>?
@@ -726,7 +722,6 @@ extension Optional : _ObjectiveCBridgeable {
726722
}
727723
}
728724

729-
@inlinable // FIXME(sil-serialize-all)
730725
@_effects(readonly)
731726
public static func _unconditionallyBridgeFromObjectiveC(_ source: AnyObject?)
732727
-> Optional<Wrapped> {

stdlib/public/core/OutputStream.swift

-6
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,9 @@ public protocol CustomDebugStringConvertible {
267267
// Default (ad-hoc) printing
268268
//===----------------------------------------------------------------------===//
269269

270-
@usableFromInline // FIXME(sil-serialize-all)
271270
@_silgen_name("swift_EnumCaseName")
272271
internal func _getEnumCaseName<T>(_ value: T) -> UnsafePointer<CChar>?
273272

274-
@usableFromInline // FIXME(sil-serialize-all)
275273
@_silgen_name("swift_OpaqueSummary")
276274
internal func _opaqueSummary(_ metadata: Any.Type) -> UnsafePointer<CChar>?
277275

@@ -559,7 +557,6 @@ extension String : TextOutputStream {
559557
/// Appends the given string to this string.
560558
///
561559
/// - Parameter other: A string to append.
562-
@inlinable // FIXME(sil-serialize-all)
563560
public mutating func write(_ other: String) {
564561
self += other
565562
}
@@ -573,7 +570,6 @@ extension String : TextOutputStreamable {
573570
/// Writes the string into the given output stream.
574571
///
575572
/// - Parameter target: An output stream.
576-
@inlinable // FIXME(sil-serialize-all)
577573
public func write<Target : TextOutputStream>(to target: inout Target) {
578574
target.write(self)
579575
}
@@ -583,7 +579,6 @@ extension Character : TextOutputStreamable {
583579
/// Writes the character into the given output stream.
584580
///
585581
/// - Parameter target: An output stream.
586-
@inlinable // FIXME(sil-serialize-all)
587582
public func write<Target : TextOutputStream>(to target: inout Target) {
588583
target.write(String(self))
589584
}
@@ -594,7 +589,6 @@ extension Unicode.Scalar : TextOutputStreamable {
594589
/// output stream.
595590
///
596591
/// - Parameter target: An output stream.
597-
@inlinable // FIXME(sil-serialize-all)
598592
public func write<Target : TextOutputStream>(to target: inout Target) {
599593
target.write(String(Character(self)))
600594
}

stdlib/public/core/Shims.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ internal func _makeSwiftNSFastEnumerationState()
2727

2828
/// A dummy value to be used as the target for `mutationsPtr` in fast
2929
/// enumeration implementations.
30-
@usableFromInline // FIXME(sil-serialize-all)
30+
@usableFromInline
3131
internal var _fastEnumerationStorageMutationsTarget: CUnsignedLong = 0
3232

3333
/// A dummy pointer to be used as `mutationsPtr` in fast enumeration
3434
/// implementations.
35-
@usableFromInline // FIXME(sil-serialize-all)
35+
@usableFromInline
3636
internal let _fastEnumerationStorageMutationsPtr =
3737
UnsafeMutablePointer<CUnsignedLong>(Builtin.addressof(&_fastEnumerationStorageMutationsTarget))
3838
#endif

0 commit comments

Comments
 (0)