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

Unified Diff: src/heap/incremental-marking.cc

Issue 1293773002: [heap] Simplify MarkingDeque implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar work. Created 5 years, 4 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 | « no previous file | src/heap/mark-compact.h » ('j') | src/heap/mark-compact.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.cc
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
index db19165f0a310eb0dec219df1226b8333c17e96e..cb2ac1e75d95f2b9ab0e02a4b0495291f5bae2eb 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -198,11 +198,15 @@ class IncrementalMarkingMarkingVisitor
} while (scan_until_end && start_offset < object_size);
chunk->set_progress_bar(start_offset);
if (start_offset < object_size) {
+ MarkCompactCollector* collector = heap->mark_compact_collector();
if (Marking::IsGrey(Marking::MarkBitFrom(object))) {
- heap->mark_compact_collector()->marking_deque()->UnshiftGrey(object);
+ collector->marking_deque()->UnshiftGrey(object);
} else {
DCHECK(Marking::IsBlack(Marking::MarkBitFrom(object)));
- heap->mark_compact_collector()->marking_deque()->UnshiftBlack(object);
+ if (!collector->marking_deque()->UnshiftBlack(object)) {
+ MemoryChunk::IncrementLiveBytesFromGC(object, -object->Size());
+ Marking::BlackToGrey(object);
+ }
}
heap->incremental_marking()->NotifyIncompleteScanOfObject(
object_size - (start_offset - already_scanned_offset));
« no previous file with comments | « no previous file | src/heap/mark-compact.h » ('j') | src/heap/mark-compact.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698