-
ggaren@apple.com authored
Reviewed by Oliver Hunt. Removed some complexity from HandleHeap https://bugs.webkit.org/show_bug.cgi?id=57650 Eliminated pointer-tagging flags. Tied being weak to having a finalizer (or at least a finalizer sentinel). * collector/handles/HandleHeap.cpp: (JSC::HandleHeap::clearWeakPointers): Removed the special self-destroying flag. It was unused. If we bring it back, we'll probably use a shared autodeallocating finalizer instead. * collector/handles/HandleHeap.h: (JSC::HandleHeap::makeWeak): makeWeak and adding a finalizer are now a single, atomic operation -- this makes the relationship between finalizers and weak pointers clearer, and impossible to get wrong. (JSC::HandleHeap::Node::Node): (JSC::HandleHeap::Node::handleHeap): No more flags. (JSC::HandleHeap::Node::makeWeak): (JSC::HandleHeap::Node::isWeak): Ditto above. We use a special sentienl value in the finalizer slot to indicate that a handle is weak but doesn't require an external function call for finalization. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5311d289