File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,11 @@ internal struct _BridgeStorage<NativeClass: AnyObject> {
7474 @inlinable
7575 @inline ( __always)
7676 internal init ( taggedPayload: UInt ) {
77+ #if !$Embedded
78+ rawValue = _bridgeObject ( taggingPayload: taggedPayload)
79+ #else
7780 rawValue = Builtin . reinterpretCast ( taggedPayload)
81+ #endif
7882 }
7983#endif
8084
@@ -134,7 +138,11 @@ internal struct _BridgeStorage<NativeClass: AnyObject> {
134138 internal var nativeInstance : Native {
135139 @inline ( __always) get {
136140 _internalInvariant ( isNative)
141+ #if !$Embedded
142+ return Builtin . castReferenceFromBridgeObject ( rawValue)
143+ #else
137144 return rawValue
145+ #endif
138146 }
139147 }
140148
@@ -145,7 +153,11 @@ internal struct _BridgeStorage<NativeClass: AnyObject> {
145153 #if !$Embedded
146154 _internalInvariant ( _nonPointerBits ( rawValue) == 0 )
147155 #endif
156+ #if !$Embedded
157+ return Builtin . reinterpretCast ( rawValue)
158+ #else
148159 return rawValue
160+ #endif
149161 }
150162 }
151163
Original file line number Diff line number Diff line change @@ -473,7 +473,7 @@ extension _DictionaryStorage {
473473 truncatingIfNeeded: ObjectIdentifier ( storage) . hashValue)
474474 }
475475
476- storage. _seed = seed ?? _HashTable. hashSeed ( for: storage, scale: scale)
476+ storage. _seed = seed ?? _HashTable. hashSeed ( for: Builtin . castToNativeObject ( storage) , scale: scale)
477477 storage. _rawKeys = UnsafeMutableRawPointer ( keysAddr)
478478 storage. _rawValues = UnsafeMutableRawPointer ( valuesAddr)
479479
You can’t perform that action at this time.
0 commit comments