Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 59be6c12449db1522f33431395e5dcb021c0a815
https://github.com/WebKit/WebKit/commit/59be6c12449db1522f33431395e5dcb021c0a815
Author: Dan Hecht <[email protected]>
Date: 2026-09-25 (Fri, 25 Sep 2026)
Changed paths:
M Source/JavaScriptCore/CMakeLists.txt
M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
M Source/JavaScriptCore/Sources.txt
A Source/JavaScriptCore/heap/Collector.cpp
A Source/JavaScriptCore/heap/CollectorInlines.h
M Source/JavaScriptCore/heap/Heap.cpp
M Source/JavaScriptCore/heap/HeapInlines.h
M Source/JavaScriptCore/heap/MarkingConstraintSolver.cpp
Log Message:
-----------
[JSC] Move the Collector implementation out of Heap.cpp
https://bugs.webkit.org/show_bug.cgi?id=325167
rdar://188297962
Reviewed by Yusuke Suzuki.
Follow on to 321791@main, which left Collector's methods in Heap.cpp so the
split would read
as a diff. This moves them to Collector.cpp, and moves
Collector::forEachSlotVisitor() from
HeapInlines.h to a new CollectorInlines.h.
The moved code is unchanged except:
* Collector.cpp defines its own CollectorInternal::verbose, since Heap.cpp and
Collector.cpp
share a unified source bundle and cannot both define HeapInternal::verbose.
This renames
seven logging sites.
* maxPauseMS() moves along with its only two callers.
* Trailing whitespace is removed from the moved lines.
Heap.cpp gains an explicit instantiation of
Heap::iterateExecutingAndCompilingCodeBlocks<SlotVisitor>,
which Collector::runEndPhase calls but Heap.cpp defines.
No functional change, covered by existing tests.
* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/Sources.txt:
* Source/JavaScriptCore/heap/Collector.cpp: Added.
(JSC::Collector::Collector):
(JSC::Collector::assertMarkStacksEmpty):
(JSC::Collector::endMarking):
(JSC::Collector::shouldCollectInCollectorThread):
(JSC::Collector::startThread):
(JSC::Collector::startCollectingContinuously):
(JSC::Collector::stopCollectingContinuously):
(JSC::Collector::collectInCollectorThread):
(JSC::Collector::runCurrentPhase):
(JSC::Collector::runNotRunningPhase):
(JSC::Collector::runBeginPhase):
(JSC::Collector::runFixpointPhase):
(JSC::Collector::runConcurrentPhase):
(JSC::Collector::runReloopPhase):
(JSC::Collector::runEndPhase):
(JSC::Collector::changePhase):
(JSC::Collector::finishChangingPhase):
(JSC::Collector::stopThePeriphery):
(JSC::Collector::resumeThePeriphery):
(JSC::Collector::requestCollection):
(JSC::Collector::suspendCompilerThreads):
(JSC::Collector::didFinishCollection):
(JSC::Collector::resumeCompilerThreads):
(JSC::Collector::bytesVisited):
(JSC::Collector::runTaskInParallel):
* Source/JavaScriptCore/heap/CollectorInlines.h: Added.
(JSC::Collector::forEachSlotVisitor):
* Source/JavaScriptCore/heap/Heap.cpp:
(JSC::Heap::clearConcurrentRetainedDataIfPossible):
(): Deleted.
(JSC::Collector::Collector): Deleted.
(JSC::Collector::assertMarkStacksEmpty): Deleted.
(JSC::Collector::endMarking): Deleted.
* Source/JavaScriptCore/heap/HeapInlines.h:
(JSC::Collector::forEachSlotVisitor): Deleted.
* Source/JavaScriptCore/heap/MarkingConstraintSolver.cpp:
Canonical link: https://commits.webkit.org/321908@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications