Ignore:
Timestamp:
Sep 19, 2011, 4:15:21 PM (14 years ago)
Author:
[email protected]
Message:

Refactor Heap allocation logic into separate AllocationSpace class
https://bugs.webkit.org/show_bug.cgi?id=68409

Reviewed by Gavin Barraclough.

../../../../Volumes/Data/git/WebKit/OpenSource/Source/JavaScriptCore:

This patch hoists direct manipulation of the MarkedSpace and related
data out of Heap and into a separate class. This will allow us to
have multiple allocation spaces in future, so easing the way towards
having GC'd backing stores for objects.

(JSC::Debugger::recompileAllJSFunctions):

  • heap/AllocationSpace.cpp: Added.

(JSC::AllocationSpace::tryAllocate):
(JSC::AllocationSpace::allocateSlowCase):
(JSC::AllocationSpace::allocateBlock):
(JSC::AllocationSpace::freeBlocks):
(JSC::TakeIfEmpty::TakeIfEmpty):
(JSC::TakeIfEmpty::operator()):
(JSC::TakeIfEmpty::returnValue):
(JSC::AllocationSpace::shrink):

  • heap/AllocationSpace.h: Added.

(JSC::AllocationSpace::AllocationSpace):
(JSC::AllocationSpace::blocks):
(JSC::AllocationSpace::sizeClassFor):
(JSC::AllocationSpace::setHighWaterMark):
(JSC::AllocationSpace::highWaterMark):
(JSC::AllocationSpace::canonicalizeBlocks):
(JSC::AllocationSpace::resetAllocator):
(JSC::AllocationSpace::forEachCell):
(JSC::AllocationSpace::forEachBlock):
(JSC::AllocationSpace::allocate):

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::reportExtraMemoryCostSlowCase):
(JSC::Heap::getConservativeRegisterRoots):
(JSC::Heap::markRoots):
(JSC::Heap::clearMarks):
(JSC::Heap::sweep):
(JSC::Heap::objectCount):
(JSC::Heap::size):
(JSC::Heap::capacity):
(JSC::Heap::globalObjectCount):
(JSC::Heap::objectTypeCounts):
(JSC::Heap::collect):
(JSC::Heap::canonicalizeBlocks):
(JSC::Heap::resetAllocator):
(JSC::Heap::freeBlocks):
(JSC::Heap::shrink):

  • heap/Heap.h:

(JSC::Heap::objectSpace):
(JSC::Heap::sizeClassForObject):
(JSC::Heap::allocate):

  • jit/JITInlineMethods.h:

(JSC::JIT::emitAllocateBasicJSObject):

  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::recompileAllJSFunctions):
(JSC::JSGlobalData::releaseExecutableMemory):

../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebCore:

Adding a forwarding header.

  • ForwardingHeaders/heap/AllocationSpace.h: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r95485 r95493  
     12011-09-19  Oliver Hunt  <[email protected]>
     2
     3        Refactor Heap allocation logic into separate AllocationSpace class
     4        https://bugs.webkit.org/show_bug.cgi?id=68409
     5
     6        Reviewed by Gavin Barraclough.
     7
     8        This patch hoists direct manipulation of the MarkedSpace and related
     9        data out of Heap and into a separate class.  This will allow us to
     10        have multiple allocation spaces in future, so easing the way towards
     11        having GC'd backing stores for objects.
     12
     13        * CMakeLists.txt:
     14        * GNUmakefile.list.am:
     15        * JavaScriptCore.exp:
     16        * JavaScriptCore.gypi:
     17        * JavaScriptCore.pro:
     18        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
     19        * JavaScriptCore.xcodeproj/project.pbxproj:
     20        * debugger/Debugger.cpp:
     21        (JSC::Debugger::recompileAllJSFunctions):
     22        * heap/AllocationSpace.cpp: Added.
     23        (JSC::AllocationSpace::tryAllocate):
     24        (JSC::AllocationSpace::allocateSlowCase):
     25        (JSC::AllocationSpace::allocateBlock):
     26        (JSC::AllocationSpace::freeBlocks):
     27        (JSC::TakeIfEmpty::TakeIfEmpty):
     28        (JSC::TakeIfEmpty::operator()):
     29        (JSC::TakeIfEmpty::returnValue):
     30        (JSC::AllocationSpace::shrink):
     31        * heap/AllocationSpace.h: Added.
     32        (JSC::AllocationSpace::AllocationSpace):
     33        (JSC::AllocationSpace::blocks):
     34        (JSC::AllocationSpace::sizeClassFor):
     35        (JSC::AllocationSpace::setHighWaterMark):
     36        (JSC::AllocationSpace::highWaterMark):
     37        (JSC::AllocationSpace::canonicalizeBlocks):
     38        (JSC::AllocationSpace::resetAllocator):
     39        (JSC::AllocationSpace::forEachCell):
     40        (JSC::AllocationSpace::forEachBlock):
     41        (JSC::AllocationSpace::allocate):
     42        * heap/Heap.cpp:
     43        (JSC::Heap::Heap):
     44        (JSC::Heap::reportExtraMemoryCostSlowCase):
     45        (JSC::Heap::getConservativeRegisterRoots):
     46        (JSC::Heap::markRoots):
     47        (JSC::Heap::clearMarks):
     48        (JSC::Heap::sweep):
     49        (JSC::Heap::objectCount):
     50        (JSC::Heap::size):
     51        (JSC::Heap::capacity):
     52        (JSC::Heap::globalObjectCount):
     53        (JSC::Heap::objectTypeCounts):
     54        (JSC::Heap::collect):
     55        (JSC::Heap::canonicalizeBlocks):
     56        (JSC::Heap::resetAllocator):
     57        (JSC::Heap::freeBlocks):
     58        (JSC::Heap::shrink):
     59        * heap/Heap.h:
     60        (JSC::Heap::objectSpace):
     61        (JSC::Heap::sizeClassForObject):
     62        (JSC::Heap::allocate):
     63        * jit/JITInlineMethods.h:
     64        (JSC::JIT::emitAllocateBasicJSObject):
     65        * runtime/JSGlobalData.cpp:
     66        (JSC::JSGlobalData::recompileAllJSFunctions):
     67        (JSC::JSGlobalData::releaseExecutableMemory):
     68
    1692011-09-19  Adam Roben  <[email protected]>
    270
Note: See TracChangeset for help on using the changeset viewer.