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:
Greg Parker
2014-10-14 01:33:29 +00:00
parent a536a67d12
commit 330752b749
9 changed files with 6 additions and 118 deletions

View File

@@ -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) {