Skip to content
  • ggaren@apple.com's avatar
    2011-02-23 Geoffrey Garen <ggaren@apple.com> · 428bb493
    ggaren@apple.com authored
            Reviewed by Darin Adler.
    
            Refactored MarkedSpace to operate in terms of size classes
            https://bugs.webkit.org/show_bug.cgi?id=55106
            
            SunSpider reports no change.
    
            * runtime/JSCell.h:
            (JSC::JSCell::MarkedSpace::sizeClassFor):
            (JSC::JSCell::MarkedSpace::allocate): Delegate allocation based on size
            class. Since these functions are inline, the compiler can constant fold
            them.
    
            * runtime/MarkedBlock.h:
            (JSC::MarkedBlock::cellSize):
            (JSC::MarkedBlock::size): Factored out a cellSize() helper.
    
            * runtime/MarkedSpace.cpp:
            (JSC::MarkedSpace::allocateBlock):
            (JSC::MarkedSpace::allocateFromSizeClass):
            (JSC::MarkedSpace::shrink):
            (JSC::MarkedSpace::reset):
            * runtime/MarkedSpace.h:
            (JSC::MarkedSpace::SizeClass::SizeClass):
            (JSC::MarkedSpace::SizeClass::reset): Changed to operate in terms of
            abstract SizeClass objects, which are independent linked lists of blocks
            of a certain size class, instead of a single m_heap object.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    428bb493