2011-05-29 Geoffrey Garen <ggaren@apple.com>
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 May 2011 21:56:53 +0000 (21:56 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 May 2011 21:56:53 +0000 (21:56 +0000)
commitf410c56fb1eb1dc727d1ace0fc6fd0b70a9425dc
tree80ed32cc497446aa96320ae19f4a9ac98058a1ce
parent40e7777d5301df7c32d0e2267767637f911e31ec
2011-05-29  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Some heap refactoring
        https://bugs.webkit.org/show_bug.cgi?id=61704

        SunSpider says no change.

        * JavaScriptCore.exp: Export!

        * heap/Heap.cpp: COLLECT_ON_EVERY_ALLOCATION can actually do so now.

        (JSC::Heap::Heap): Changed Heap sub-objects to point to the heap.

        (JSC::Heap::allocate): Changed inline allocation code to only select the
        size class, since this can be optimized out at compile time -- everything
        else is now inlined into this out-of-line function.

        No need to duplicate ASSERTs made in our caller.

        * heap/Heap.h:
        (JSC::Heap::heap):
        (JSC::Heap::isMarked):
        (JSC::Heap::testAndSetMarked):
        (JSC::Heap::testAndClearMarked):
        (JSC::Heap::setMarked): Call directly into MarkedBlock instead of adding
        a layer of indirection through MarkedSpace.

        (JSC::Heap::allocate): See above.

        * heap/MarkedBlock.cpp:
        (JSC::MarkedBlock::create):
        (JSC::MarkedBlock::MarkedBlock):
        * heap/MarkedBlock.h: Changed Heap sub-objects to point to the heap.

        * heap/MarkedSpace.cpp:
        (JSC::MarkedSpace::MarkedSpace):
        (JSC::MarkedSpace::allocateBlock):
        * heap/MarkedSpace.h:
        (JSC::MarkedSpace::allocate): Updated to match changes above.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.exp
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
Source/JavaScriptCore/heap/Heap.cpp
Source/JavaScriptCore/heap/Heap.h
Source/JavaScriptCore/heap/MarkedBlock.cpp
Source/JavaScriptCore/heap/MarkedBlock.h
Source/JavaScriptCore/heap/MarkedSpace.cpp
Source/JavaScriptCore/heap/MarkedSpace.h