Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b8c79b44381278952d7895000ce7b4313c8476a1
https://github.com/WebKit/WebKit/commit/b8c79b44381278952d7895000ce7b4313c8476a1
Author: Dan Hecht <[email protected]>
Date: 2026-10-14 (Wed, 14 Oct 2026)
Changed paths:
M Source/JavaScriptCore/heap/HeapCell.cpp
M Source/JavaScriptCore/heap/HeapCell.h
M Source/JavaScriptCore/heap/MarkedBlock.cpp
M Source/JavaScriptCore/heap/MarkedBlock.h
M Source/JavaScriptCore/heap/MarkedBlockInlines.h
M Source/JavaScriptCore/heap/MarkedSpace.cpp
M Source/JavaScriptCore/heap/MarkedSpace.h
M Source/JavaScriptCore/heap/PreciseAllocation.cpp
Log Message:
-----------
[JSC] Clarify what MarkedBlock's versioned mark and newly-allocated bits
record
https://bugs.webkit.org/show_bug.cgi?id=327567
rdar://190039791
Reviewed by Yusuke Suzuki.
Collecting several heaps together means deciding how their marking versions
relate. That needs a clear picture of what a block's marks and newly-allocated
bits record at each point in a collection, and of when a stale version still
means something. The code made that picture hard to recover: the explanations
were scattered and in places misleading, "live" was never defined, and several
functions are named for when they run rather than for what they do.
So write down what the bit sets record where they are declared, explain the
steps that depend on it where they happen, and name the functions involved for
what they do:
- marksConveyLivenessDuringMarking() is now staleMarksStillRecordSurvivors().
- aboutToMarkSlow() is now resetStaleMarks().
- resetMarks() is now resetMarksForVersionWrap().
- resetAllocated() is now resetNewlyAllocatedForVersionWrap().
No behavior change.
* Source/JavaScriptCore/heap/HeapCell.cpp:
(JSC::HeapCell::isPendingDestruction):
* Source/JavaScriptCore/heap/HeapCell.h:
* Source/JavaScriptCore/heap/MarkedBlock.cpp:
(JSC::MarkedBlock::resetStaleMarks):
(JSC::MarkedBlock::resetNewlyAllocatedForVersionWrap):
(JSC::MarkedBlock::resetMarksForVersionWrap):
(JSC::MarkedBlock::aboutToMarkSlow): Deleted.
(JSC::MarkedBlock::resetAllocated): Deleted.
(JSC::MarkedBlock::resetMarks): Deleted.
* Source/JavaScriptCore/heap/MarkedBlock.h:
(JSC::MarkedBlock::aboutToMark):
* Source/JavaScriptCore/heap/MarkedBlockInlines.h:
(JSC::MarkedBlock::staleMarksStillRecordSurvivors):
(JSC::MarkedBlock::Handle::isLive):
(JSC::MarkedBlock::Handle::marksMode):
(JSC::MarkedBlock::Handle::forEachLiveCell):
(JSC::MarkedBlock::marksConveyLivenessDuringMarking): Deleted.
* Source/JavaScriptCore/heap/MarkedSpace.cpp:
(JSC::MarkedSpace::beginMarking):
(JSC::MarkedSpace::endMarking):
* Source/JavaScriptCore/heap/MarkedSpace.h:
* Source/JavaScriptCore/heap/PreciseAllocation.cpp:
(JSC::PreciseAllocation::flip):
Canonical link: https://commits.webkit.org/323785@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications