Ignore:
Timestamp:
Apr 6, 2012, 3:35:55 PM (13 years ago)
Author:
[email protected]
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r113445 r113508  
    324324    , m_sharedData(globalData)
    325325    , m_slotVisitor(m_sharedData)
    326     , m_weakHeap(this)
    327     , m_handleHeap(globalData)
     326    , m_weakSet(this)
     327    , m_handleSet(globalData)
    328328    , m_isSafeToCollect(false)
    329329    , m_globalData(globalData)
     
    376376    clearMarks();
    377377
    378     m_weakHeap.finalizeAll();
     378    m_weakSet.finalizeAll();
    379379    m_globalData->smallStrings.finalizeSmallStrings();
    380380    shrink();
     
    661661        {
    662662            GCPHASE(VisitStrongHandles);
    663             m_handleHeap.visitStrongHandles(heapRootVisitor);
     663            m_handleSet.visitStrongHandles(heapRootVisitor);
    664664            visitor.donateAndDrain();
    665665        }
     
    690690        GCPHASE(VisitingLiveWeakHandles);
    691691        while (true) {
    692             m_weakHeap.visitLiveWeakImpls(heapRootVisitor);
     692            m_weakSet.visitLiveWeakImpls(heapRootVisitor);
    693693            harvestWeakReferences();
    694694            if (visitor.isEmpty())
     
    706706    {
    707707        GCPHASE(VisitingDeadWeakHandles);
    708         m_weakHeap.visitDeadWeakImpls(heapRootVisitor);
     708        m_weakSet.visitDeadWeakImpls(heapRootVisitor);
    709709    }
    710710
     
    819819    {
    820820        GCPHASE(FinalizeWeakHandles);
    821         m_weakHeap.sweep();
     821        m_weakSet.sweep();
    822822        m_globalData->smallStrings.finalizeSmallStrings();
    823823    }
     
    867867{
    868868    m_objectSpace.resetAllocators();
    869     m_weakHeap.resetAllocator();
     869    m_weakSet.resetAllocator();
    870870}
    871871
     
    928928void Heap::addFinalizer(JSCell* cell, Finalizer finalizer)
    929929{
    930     weakHeap()->allocate(cell, &m_finalizerOwner, reinterpret_cast<void*>(finalizer)); // Balanced by FinalizerOwner::finalize().
     930    weakSet()->allocate(cell, &m_finalizerOwner, reinterpret_cast<void*>(finalizer)); // Balanced by FinalizerOwner::finalize().
    931931}
    932932
     
    936936    Finalizer finalizer = reinterpret_cast<Finalizer>(context);
    937937    finalizer(slot->asCell());
    938     WeakHeap::deallocate(WeakImpl::asWeakImpl(slot));
     938    WeakSet::deallocate(WeakImpl::asWeakImpl(slot));
    939939}
    940940
Note: See TracChangeset for help on using the changeset viewer.