Clearing MarkedBlock::m_newlyAllocated should be separate from MarkedBlock::clearMarks
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Sep 2013 23:36:40 +0000 (23:36 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Sep 2013 23:36:40 +0000 (23:36 +0000)
commit549ca414fc1db6e8af598f98e1f13b34fabea139
treebd6af6387d47b1d799190ed5926d6477155db79d
parente59477f3f480eecd61c7cd522372b8a633f3d936
Clearing MarkedBlock::m_newlyAllocated should be separate from MarkedBlock::clearMarks
https://bugs.webkit.org/show_bug.cgi?id=121007

Reviewed by Oliver Hunt.

We call clearMarks on every MarkedBlock in the Heap, whereas we only need to clear
m_newlyAllocated for the m_currentBlock at the time of the last canonicalizeCellLiveness()
for each MarkedAllocator. We also need to call it on every block in the largeAllocators
because each one of their blocks is canonicalized as it is used.

* heap/Heap.cpp:
(JSC::Heap::markRoots):
* heap/MarkedAllocator.h:
(JSC::MarkedAllocator::getAndClearCanonicalizedBlock):
(JSC::MarkedAllocator::MarkedAllocator):
(JSC::MarkedAllocator::canonicalizeCellLivenessData):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::lastChanceToFinalize):
(JSC::MarkedBlock::clearMarks):
(JSC::MarkedBlock::clearNewlyAllocated):
* heap/MarkedSpace.cpp:
(JSC::clearNewlyAllocatedInBlock):
(JSC::ClearNewlyAllocated::operator()):
(JSC::MarkedSpace::clearNewlyAllocated):
* heap/MarkedSpace.h:

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