Renamed

        WeakHeap => WeakSet
        HandleHeap => HandleSet

Reviewed by Sam Weinig.

These sets do have internal allocators, but it's confusing to call them
heaps because they're sub-objects of an object called "heap".

* heap/HandleHeap.cpp: Removed.
* heap/HandleHeap.h: Removed.
* heap/HandleSet.cpp: Copied from JavaScriptCore/heap/HandleHeap.cpp.
* heap/WeakHeap.cpp: Removed.
* heap/WeakHeap.h: Removed.
* heap/WeakSet.cpp: Copied from JavaScriptCore/heap/WeakHeap.cpp.
* heap/WeakSet.h: Copied from JavaScriptCore/heap/WeakHeap.h.

Plus global rename using grep.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/heap/Heap.cpp b/Source/JavaScriptCore/heap/Heap.cpp
index 0b4d9a8..3d3267f 100644
--- a/Source/JavaScriptCore/heap/Heap.cpp
+++ b/Source/JavaScriptCore/heap/Heap.cpp
@@ -323,8 +323,8 @@
     , m_machineThreads(this)
     , m_sharedData(globalData)
     , m_slotVisitor(m_sharedData)
-    , m_weakHeap(this)
-    , m_handleHeap(globalData)
+    , m_weakSet(this)
+    , m_handleSet(globalData)
     , m_isSafeToCollect(false)
     , m_globalData(globalData)
     , m_lastGCLength(0)
@@ -375,7 +375,7 @@
     canonicalizeCellLivenessData();
     clearMarks();
 
-    m_weakHeap.finalizeAll();
+    m_weakSet.finalizeAll();
     m_globalData->smallStrings.finalizeSmallStrings();
     shrink();
     m_storageSpace.destroy();
@@ -660,7 +660,7 @@
     
         {
             GCPHASE(VisitStrongHandles);
-            m_handleHeap.visitStrongHandles(heapRootVisitor);
+            m_handleSet.visitStrongHandles(heapRootVisitor);
             visitor.donateAndDrain();
         }
     
@@ -689,7 +689,7 @@
     {
         GCPHASE(VisitingLiveWeakHandles);
         while (true) {
-            m_weakHeap.visitLiveWeakImpls(heapRootVisitor);
+            m_weakSet.visitLiveWeakImpls(heapRootVisitor);
             harvestWeakReferences();
             if (visitor.isEmpty())
                 break;
@@ -705,7 +705,7 @@
 
     {
         GCPHASE(VisitingDeadWeakHandles);
-        m_weakHeap.visitDeadWeakImpls(heapRootVisitor);
+        m_weakSet.visitDeadWeakImpls(heapRootVisitor);
     }
 
     GCCOUNTER(VisitedValueCount, visitor.visitCount());
@@ -818,7 +818,7 @@
         
     {
         GCPHASE(FinalizeWeakHandles);
-        m_weakHeap.sweep();
+        m_weakSet.sweep();
         m_globalData->smallStrings.finalizeSmallStrings();
     }
     
@@ -866,7 +866,7 @@
 void Heap::resetAllocators()
 {
     m_objectSpace.resetAllocators();
-    m_weakHeap.resetAllocator();
+    m_weakSet.resetAllocator();
 }
 
 void Heap::setActivityCallback(PassOwnPtr<GCActivityCallback> activityCallback)
@@ -927,7 +927,7 @@
 
 void Heap::addFinalizer(JSCell* cell, Finalizer finalizer)
 {
-    weakHeap()->allocate(cell, &m_finalizerOwner, reinterpret_cast<void*>(finalizer)); // Balanced by FinalizerOwner::finalize().
+    weakSet()->allocate(cell, &m_finalizerOwner, reinterpret_cast<void*>(finalizer)); // Balanced by FinalizerOwner::finalize().
 }
 
 void Heap::FinalizerOwner::finalize(Handle<Unknown> handle, void* context)
@@ -935,7 +935,7 @@
     HandleSlot slot = handle.slot();
     Finalizer finalizer = reinterpret_cast<Finalizer>(context);
     finalizer(slot->asCell());
-    WeakHeap::deallocate(WeakImpl::asWeakImpl(slot));
+    WeakSet::deallocate(WeakImpl::asWeakImpl(slot));
 }
 
 void Heap::addFunctionExecutable(FunctionExecutable* executable)