Changeset 91218 in webkit


Ignore:
Timestamp:
Jul 18, 2011, 3:55:47 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

JSC GC lazy sweep does not inline the common cases of cell destruction.
https://bugs.webkit.org/show_bug.cgi?id=64745

Patch by Filip Pizlo <fpizlo@apple.com> on 2011-07-18
Reviewed by Oliver Hunt.

This inlines the case of JSFinalObject destruction.

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::lazySweep):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r91216 r91218  
     12011-07-18  Filip Pizlo  <fpizlo@apple.com>
     2
     3        JSC GC lazy sweep does not inline the common cases of cell destruction.
     4        https://bugs.webkit.org/show_bug.cgi?id=64745
     5
     6        Reviewed by Oliver Hunt.
     7       
     8        This inlines the case of JSFinalObject destruction.
     9
     10        * heap/MarkedBlock.cpp:
     11        (JSC::MarkedBlock::lazySweep):
     12
    1132011-07-18  Oliver Hunt  <oliver@apple.com>
    214
  • trunk/Source/JavaScriptCore/heap/MarkedBlock.cpp

    r91039 r91218  
    8787    // order of the free list.
    8888   
     89    void* jsFinalObjectVPtr = m_heap->globalData()->jsFinalObjectVPtr;
     90   
    8991    FreeCell* result = 0;
    9092   
     
    9294        if (!m_marks.testAndSet(i)) {
    9395            JSCell* cell = reinterpret_cast<JSCell*>(&atoms()[i]);
    94             cell->~JSCell();
     96            if (cell->vptr() == jsFinalObjectVPtr) {
     97                JSFinalObject* object = reinterpret_cast<JSFinalObject*>(cell);
     98                object->JSFinalObject::~JSFinalObject();
     99            } else
     100                cell->~JSCell();
    95101            FreeCell* freeCell = reinterpret_cast<FreeCell*>(cell);
    96102            freeCell->next = result;
Note: See TracChangeset for help on using the changeset viewer.