Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: src/heap/mark-compact.cc

Issue 997423002: Use the incremental root marking visitor for overapproximating the weak closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/mark-compact.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 29cf00e9757922789a908ccf24080fd296db8636..ab77377ddc2b92bcb1792d19bdd2027fa358a36f 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -1985,7 +1985,8 @@ void MarkCompactCollector::MarkRoots(RootMarkingVisitor* visitor) {
}
-void MarkCompactCollector::MarkImplicitRefGroups() {
+void MarkCompactCollector::MarkImplicitRefGroups(
+ MarkObjectFunction mark_object) {
List<ImplicitRefGroup*>* ref_groups =
isolate()->global_handles()->implicit_ref_groups();
@@ -2003,9 +2004,7 @@ void MarkCompactCollector::MarkImplicitRefGroups() {
// A parent object is marked, so mark all child heap objects.
for (size_t j = 0; j < entry->length; ++j) {
if ((*children[j])->IsHeapObject()) {
- HeapObject* child = HeapObject::cast(*children[j]);
- MarkBit mark = Marking::MarkBitFrom(child);
- MarkObject(child, mark);
+ mark_object(heap(), HeapObject::cast(*children[j]));
}
}
@@ -2104,7 +2103,7 @@ void MarkCompactCollector::ProcessEphemeralMarking(
if (!only_process_harmony_weak_collections) {
isolate()->global_handles()->IterateObjectGroups(
visitor, &IsUnmarkedHeapObjectWithHeap);
- MarkImplicitRefGroups();
+ MarkImplicitRefGroups(&MarkCompactMarkingVisitor::MarkObject);
}
ProcessWeakCollections();
work_to_do = !marking_deque_.IsEmpty();
@@ -2224,21 +2223,6 @@ void MarkCompactCollector::UncommitMarkingDeque() {
}
-void MarkCompactCollector::OverApproximateWeakClosure() {
- GCTracer::Scope gc_scope(heap()->tracer(),
- GCTracer::Scope::MC_INCREMENTAL_WEAKCLOSURE);
-
- RootMarkingVisitor root_visitor(heap());
- isolate()->global_handles()->IterateObjectGroups(
- &root_visitor, &IsUnmarkedHeapObjectWithHeap);
- MarkImplicitRefGroups();
-
- // Remove object groups after marking phase.
- heap()->isolate()->global_handles()->RemoveObjectGroups();
- heap()->isolate()->global_handles()->RemoveImplicitRefGroups();
-}
-
-
void MarkCompactCollector::MarkLiveObjects() {
GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_MARK);
double start_time = 0.0;
« no previous file with comments | « src/heap/mark-compact.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698