Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 648d26d0bfa25f8d49a21f23d1f05cd1be54fcca
https://github.com/WebKit/WebKit/commit/648d26d0bfa25f8d49a21f23d1f05cd1be54fcca
Author: Dan Hecht <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M Source/JavaScriptCore/heap/Collector.cpp
M Source/JavaScriptCore/heap/Collector.h
M Source/JavaScriptCore/heap/Heap.cpp
M Source/JavaScriptCore/heap/Heap.h
M Source/JavaScriptCore/heap/MarkedSpace.cpp
M Source/JavaScriptCore/heap/MarkedSpace.h
Log Message:
-----------
[JSC] Clean up the boundary between the Collector and the Heap at the start
of a collection
https://bugs.webkit.org/show_bug.cgi?id=325691
rdar://188746204
Reviewed by Yusuke Suzuki.
Heap::willStartCollection() both decided whether a collection is Eden or Full
and recorded the
answer, reading the Collector's current request to decide. Once a Collector
marks more than one heap,
a cycle has one scope: the Collector decides it and each heap records it. Split
the two, and group the
rest of the Begin phase the same way.
* Collector::decideCollectionScope() replaces Heap::shouldDoFullCollection().
Heap::willStartCollection()
takes the scope, and also does the heap's own start-of-collection work that
ran right after it: the
Eden allocation snapshot and the heap verifier's before-GC pass.
* Collector::beginMarking() holds the marking setup at the end of
runBeginPhase, mirroring
Collector::endMarking(). The Full-collection clear of the mutator mark stack
moves into
Heap::beginMarking(), and MarkedSpace::prepareForMarking() folds into
MarkedSpace::beginMarking().
* Heap::useGenerationalGC() is inlined into its only caller.
No change in behavior.
* Source/JavaScriptCore/heap/Collector.cpp:
(JSC::Collector::decideCollectionScope):
(JSC::Collector::runBeginPhase):
(JSC::Collector::beginMarking):
* Source/JavaScriptCore/heap/Collector.h:
* Source/JavaScriptCore/heap/Heap.cpp:
(JSC::Heap::beginMarking):
(JSC::Heap::clearConcurrentRetainedDataIfPossible):
* Source/JavaScriptCore/heap/Heap.h:
* Source/JavaScriptCore/heap/MarkedSpace.cpp:
(JSC::MarkedSpace::beginMarking):
(JSC::MarkedSpace::prepareForMarking): Deleted.
* Source/JavaScriptCore/heap/MarkedSpace.h:
Canonical link: https://commits.webkit.org/322272@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications