File tree Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 520a2d7afeca4c51efb1b1020453d509216a113a
2
+ refs/heads/master: 61dc9094e6aaed44f6cc0d69f12d15da2e62acab
3
3
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
4
4
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
5
5
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
Original file line number Diff line number Diff line change @@ -312,6 +312,11 @@ func _uncheckedUnsafeAssume(_ condition: Bool) {
312
312
@usableFromInline
313
313
@_silgen_name ( " _swift_objcClassUsesNativeSwiftReferenceCounting " )
314
314
internal func _usesNativeSwiftReferenceCounting( _ theClass: AnyClass ) -> Bool
315
+
316
+ /// Returns the class of a non-tagged-pointer Objective-C object
317
+ @_effects ( readonly)
318
+ @_silgen_name ( " _swift_classOfObjCHeapObject " )
319
+ internal func _swift_class OfObjCHeapObject( _ object: AnyObject ) -> AnyClass
315
320
#else
316
321
@inlinable
317
322
@inline ( __always)
Original file line number Diff line number Diff line change @@ -125,11 +125,6 @@ private var kCFStringEncodingUTF8 : _swift_shims_CFStringEncoding {
125
125
@inline ( __always) get { return 0x8000100 }
126
126
}
127
127
128
- @_effects ( readonly)
129
- private func _unsafeAddressOfCocoaStringClass( _ str: _CocoaString ) -> UInt {
130
- return _swift_stdlib_unsafeAddressOfClass ( str)
131
- }
132
-
133
128
internal enum _KnownCocoaString {
134
129
case storage
135
130
case shared
@@ -148,7 +143,7 @@ internal enum _KnownCocoaString {
148
143
}
149
144
#endif
150
145
151
- switch _unsafeAddressOfCocoaStringClass ( str) {
146
+ switch unsafeBitCast ( _swift_classOfObjCHeapObject ( str) , to : UInt . self ) {
152
147
case unsafeBitCast ( __StringStorage. self, to: UInt . self) :
153
148
self = . storage
154
149
case unsafeBitCast ( __SharedStringStorage. self, to: UInt . self) :
Original file line number Diff line number Diff line change @@ -177,6 +177,11 @@ static Class _swift_getObjCClassOfAllocated(const void *object) {
177
177
class_getInstanceSize (cls), mask));
178
178
}
179
179
180
+ SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_API
181
+ Class _swift_classOfObjCHeapObject(OpaqueValue *value) {
182
+ return _swift_getObjCClassOfAllocated (value);
183
+ }
184
+
180
185
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_API
181
186
NSString *swift_stdlib_getDescription(OpaqueValue *value,
182
187
const Metadata *type);
You can’t perform that action at this time.
0 commit comments