2011-06-07 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Split 'reset' into 'collect' and 'resetAllocator'
https://bugs.webkit.org/show_bug.cgi?id=62267
* heap/Heap.cpp:
(JSC::Heap::allocate):
(JSC::Heap::collectAllGarbage):
(JSC::Heap::collect):
* heap/Heap.h:
* heap/MarkedBlock.h:
(JSC::MarkedBlock::resetAllocator):
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::resetAllocator):
* heap/MarkedSpace.h:
(JSC::MarkedSpace::SizeClass::resetAllocator):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/heap/Heap.cpp b/Source/JavaScriptCore/heap/Heap.cpp
index f3c0456..a9aa29b 100644
--- a/Source/JavaScriptCore/heap/Heap.cpp
+++ b/Source/JavaScriptCore/heap/Heap.cpp
@@ -141,7 +141,7 @@
if (result)
return result;
- reset(DoNotSweep);
+ collect(DoNotSweep);
m_operationInProgress = Allocation;
result = m_markedSpace.allocate(sizeClass);
@@ -391,10 +391,10 @@
if (!m_globalData->dynamicGlobalObject)
m_globalData->recompileAllJSFunctions();
- reset(DoSweep);
+ collect(DoSweep);
}
-void Heap::reset(SweepToggle sweepToggle)
+void Heap::collect(SweepToggle sweepToggle)
{
ASSERT(globalData()->identifierTable == wtfThreadData().currentIdentifierTable());
JAVASCRIPTCORE_GC_BEGIN();
@@ -405,7 +405,7 @@
JAVASCRIPTCORE_GC_MARKED();
- m_markedSpace.reset();
+ m_markedSpace.resetAllocator();
m_extraCost = 0;
#if ENABLE(JSC_ZOMBIES)