You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5e53548
Browse filesBrowse the repository at this point in the historyBrowse files
[JSC] Move the marking constraint set to the Collector
https://bugs.webkit.org/show_bug.cgi?id=325513
rdar://188601461
Reviewed by Vassili Bykov.
The constraint set is what a collection's fixpoint converges, and once a Collector marks more than one
heap its constraints are no longer one heap's. Move it from Heap to Collector.
* Collector owns the MarkingConstraintSet and exposes addMarkingConstraint(), which Heap uses to
register its core constraints and embedders' constraints. It asserts that no collection is running,
since a collection iterates the set.
* MarkingConstraintSet drops the Heap it stored and never used.
* MarkingConstraintSolver reaches the Collector through its main visitor instead of a Heap.
* Leave defaults off Collector::addMarkingConstraint() parameters. There's a limited number
of constraints, so I think it's better to make them explicit, especially since the constraints
themselves will change somewhat to allow a Collector to mark multiple Heaps.
Heap::verifierMark still runs the set directly; how the verifier should run constraints once it covers
more than one heap is left for later.
No change in behavior.
* Source/JavaScriptCore/heap/Collector.cpp:
(JSC::Collector::Collector):
(JSC::Collector::runBeginPhase):
(JSC::Collector::runFixpointPhase):
(JSC::Collector::addMarkingConstraint):
* Source/JavaScriptCore/heap/Collector.h:
* Source/JavaScriptCore/heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::clearConcurrentRetainedDataIfPossible):
* Source/JavaScriptCore/heap/Heap.h:
* Source/JavaScriptCore/heap/MarkingConstraintSet.cpp:
(JSC::MarkingConstraintSet::executeConvergenceImpl):
(JSC::MarkingConstraintSet::MarkingConstraintSet): Deleted.
* Source/JavaScriptCore/heap/MarkingConstraintSet.h:
(JSC::MarkingConstraintSet::add): Deleted.
* Source/JavaScriptCore/heap/MarkingConstraintSolver.cpp:
(JSC::MarkingConstraintSolver::MarkingConstraintSolver):
(JSC::MarkingConstraintSolver::execute):
* Source/JavaScriptCore/heap/MarkingConstraintSolver.h:
Canonical link: https://commits.webkit.org/322104@main
0 commit comments