mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert r22710 and r22711 implementing ObjC weak ref methods on SwiftObject.
This is still incomplete and needs more work. rdar://18637774. Swift SVN r22717
This commit is contained in:
@@ -32,6 +32,11 @@
|
||||
|
||||
using namespace swift;
|
||||
|
||||
namespace swift {
|
||||
extern "C" HeapObject *swift_tryRetain(HeapObject *object);
|
||||
};
|
||||
|
||||
|
||||
HeapObject *
|
||||
swift::swift_allocObject(HeapMetadata const *metadata,
|
||||
size_t requiredSize,
|
||||
@@ -326,17 +331,6 @@ static HeapObject *_swift_tryRetain_(HeapObject *object) {
|
||||
}
|
||||
auto swift::_swift_tryRetain = _swift_tryRetain_;
|
||||
|
||||
bool swift::swift_isDeallocating(HeapObject *object) {
|
||||
return _swift_isDeallocating(object);
|
||||
}
|
||||
static bool _swift_isDeallocating_(HeapObject *object) {
|
||||
if (!object) return false;
|
||||
uint32_t count
|
||||
= reinterpret_cast<std::atomic<uint32_t>*>(&object->refCount)->load();
|
||||
return count & RC_DEALLOCATING_BIT;
|
||||
}
|
||||
auto swift::_swift_isDeallocating = _swift_isDeallocating_;
|
||||
|
||||
#endif
|
||||
|
||||
void swift::swift_retainUnowned(HeapObject *object) {
|
||||
|
||||
Reference in New Issue
Block a user