File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -78,26 +78,28 @@ extension Dictionary._Variant {
78
78
79
79
@inlinable
80
80
internal mutating func isUniquelyReferenced( ) -> Bool {
81
- return object. isUniquelyReferencedNative ( )
81
+ return object. isUniquelyReferenced_native_noSpareBits ( )
82
82
}
83
83
84
84
#if _runtime(_ObjC)
85
85
@usableFromInline @_transparent
86
86
internal var isNative : Bool {
87
- return guaranteedNative || object. isNative
87
+ if guaranteedNative { return true }
88
+ return object. isNativeWithClearedSpareBits ( 0 )
88
89
}
89
90
#endif
90
91
91
92
@usableFromInline @_transparent
92
93
internal var asNative : _NativeDictionary < Key , Value > {
93
94
get {
94
- return _NativeDictionary < Key , Value > ( object. nativeInstance )
95
+ return _NativeDictionary < Key , Value > ( object. nativeInstance_noSpareBits )
95
96
}
96
97
set {
97
98
self = . init( native: newValue)
98
99
}
99
100
_modify {
100
- var native = _NativeDictionary < Key , Value > ( object. nativeInstance)
101
+ var native = _NativeDictionary < Key , Value > (
102
+ object. nativeInstance_noSpareBits)
101
103
self = . init( dummy: ( ) )
102
104
yield & native
103
105
object = . init( native: native. _storage)
Original file line number Diff line number Diff line change @@ -75,26 +75,27 @@ extension Set._Variant {
75
75
76
76
@inlinable
77
77
internal mutating func isUniquelyReferenced( ) -> Bool {
78
- return object. isUniquelyReferencedNative ( )
78
+ return object. isUniquelyReferenced_native_noSpareBits ( )
79
79
}
80
80
81
81
#if _runtime(_ObjC)
82
82
@usableFromInline @_transparent
83
83
internal var isNative : Bool {
84
- return guaranteedNative || object. isNative
84
+ if guaranteedNative { return true }
85
+ return object. isNativeWithClearedSpareBits ( 0 )
85
86
}
86
87
#endif
87
88
88
89
@usableFromInline @_transparent
89
90
internal var asNative : _NativeSet < Element > {
90
91
get {
91
- return _NativeSet ( object. nativeInstance )
92
+ return _NativeSet ( object. nativeInstance_noSpareBits )
92
93
}
93
94
set {
94
95
self = . init( native: newValue)
95
96
}
96
97
_modify {
97
- var native = _NativeSet < Element > ( object. nativeInstance )
98
+ var native = _NativeSet < Element > ( object. nativeInstance_noSpareBits )
98
99
self = . init( dummy: ( ) )
99
100
yield & native
100
101
object = . init( native: native. _storage)
You can’t perform that action at this time.
0 commit comments