14
14
///
15
15
/// In Swift, only class instances and metatypes have unique identities. There
16
16
/// is no notion of identity for structs, enums, functions, or tuples.
17
- @_fixed_layout // FIXME(sil-serialize-all)
17
+ @_fixed_layout // trivial-implementation
18
18
public struct ObjectIdentifier {
19
- @usableFromInline // FIXME(sil-serialize-all)
19
+ @usableFromInline // trivial-implementation
20
20
internal let _value : Builtin . RawPointer
21
21
22
22
/// Creates an instance that uniquely identifies the given class instance.
@@ -47,15 +47,15 @@ public struct ObjectIdentifier {
47
47
/// // Prints "false"
48
48
///
49
49
/// - Parameter x: An instance of a class.
50
- @inlinable // FIXME(sil-serialize-all)
50
+ @inlinable // trivial-implementation
51
51
public init ( _ x: AnyObject ) {
52
52
self . _value = Builtin . bridgeToRawPointer ( x)
53
53
}
54
54
55
55
/// Creates an instance that uniquely identifies the given metatype.
56
56
///
57
57
/// - Parameter: A metatype.
58
- @inlinable // FIXME(sil-serialize-all)
58
+ @inlinable // trivial-implementation
59
59
public init ( _ x: Any . Type ) {
60
60
self . _value = unsafeBitCast ( x, to: Builtin . RawPointer. self)
61
61
}
@@ -69,14 +69,14 @@ extension ObjectIdentifier : CustomDebugStringConvertible {
69
69
}
70
70
71
71
extension ObjectIdentifier : Equatable {
72
- @inlinable // FIXME(sil-serialize-all)
72
+ @inlinable // trivial-implementation
73
73
public static func == ( x: ObjectIdentifier , y: ObjectIdentifier ) -> Bool {
74
74
return Bool ( Builtin . cmp_eq_RawPointer ( x. _value, y. _value) )
75
75
}
76
76
}
77
77
78
78
extension ObjectIdentifier : Comparable {
79
- @inlinable // FIXME(sil-serialize-all)
79
+ @inlinable // trivial-implementation
80
80
public static func < ( lhs: ObjectIdentifier , rhs: ObjectIdentifier ) -> Bool {
81
81
return UInt ( bitPattern: lhs) < UInt ( bitPattern: rhs)
82
82
}
@@ -97,7 +97,7 @@ extension ObjectIdentifier: Hashable {
97
97
extension UInt {
98
98
/// Creates an integer that captures the full value of the given object
99
99
/// identifier.
100
- @inlinable // FIXME(sil-serialize-all)
100
+ @inlinable // trivial-implementation
101
101
public init ( bitPattern objectID: ObjectIdentifier ) {
102
102
self . init ( Builtin . ptrtoint_Word ( objectID. _value) )
103
103
}
@@ -106,7 +106,7 @@ extension UInt {
106
106
extension Int {
107
107
/// Creates an integer that captures the full value of the given object
108
108
/// identifier.
109
- @inlinable // FIXME(sil-serialize-all)
109
+ @inlinable // trivial-implementation
110
110
public init ( bitPattern objectID: ObjectIdentifier ) {
111
111
self . init ( bitPattern: UInt ( bitPattern: objectID) )
112
112
}
0 commit comments