Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 8706113ae981bd25cd3302a94792143d30f4eed2..bfc913f20d27b4b10036eb770e048b4d3f9b2164 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -3202,8 +3202,8 @@ FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object, |
!Marking::IsBlack(ObjectMarking::MarkBitFrom( |
HeapObject::FromAddress(new_start), |
MarkingState::Internal(HeapObject::FromAddress(new_start))))) { |
- IncrementalMarking::TransferMark(this, object, |
- HeapObject::FromAddress(new_start)); |
+ incremental_marking()->TransferMark(this, object, |
+ HeapObject::FromAddress(new_start)); |
} |
// Technically in new space this write might be omitted (except for |
@@ -4288,7 +4288,7 @@ void Heap::RegisterReservationsForBlackAllocation(Reservation* reservations) { |
void Heap::NotifyObjectLayoutChange(HeapObject* object, |
const DisallowHeapAllocation&) { |
if (FLAG_incremental_marking && incremental_marking()->IsMarking()) { |
- incremental_marking()->MarkGrey(this, object); |
+ incremental_marking()->MarkGrey(object); |
} |
#ifdef VERIFY_HEAP |
DCHECK(pending_layout_change_object_ == nullptr); |
@@ -4855,7 +4855,7 @@ class IterateAndScavengePromotedObjectsVisitor final : public ObjectVisitor { |
// promoted objects. |
if (heap_->incremental_marking()->black_allocation()) { |
Code* code = Code::cast(Code::GetObjectFromEntryAddress(code_entry_slot)); |
- IncrementalMarking::MarkGrey(heap_, code); |
+ heap_->incremental_marking()->MarkGrey(code); |
} |
} |
@@ -4897,7 +4897,7 @@ void Heap::IterateAndScavengePromotedObject(HeapObject* target, int size, |
// regular visiting and IteratePromotedObjectPointers. |
if (!was_marked_black) { |
if (incremental_marking()->black_allocation()) { |
- IncrementalMarking::MarkGrey(this, target->map()); |
+ incremental_marking()->MarkGrey(target->map()); |
incremental_marking()->IterateBlackObject(target); |
} |
} |
@@ -5517,7 +5517,6 @@ bool Heap::SetUp() { |
store_buffer_ = new StoreBuffer(this); |
incremental_marking_ = new IncrementalMarking(this); |
- |
concurrent_marking_ = new ConcurrentMarking(this); |
for (int i = 0; i <= LAST_SPACE; i++) { |
@@ -5565,6 +5564,8 @@ bool Heap::SetUp() { |
tracer_ = new GCTracer(this); |
scavenge_collector_ = new Scavenger(this); |
mark_compact_collector_ = new MarkCompactCollector(this); |
+ incremental_marking_->set_marking_deque( |
+ mark_compact_collector_->marking_deque()); |
if (FLAG_minor_mc) |
minor_mark_compact_collector_ = new MinorMarkCompactCollector(this); |
gc_idle_time_handler_ = new GCIdleTimeHandler(); |
@@ -5676,7 +5677,7 @@ void Heap::RegisterExternallyReferencedObject(Object** object) { |
HeapObject* heap_object = HeapObject::cast(*object); |
DCHECK(Contains(heap_object)); |
if (FLAG_incremental_marking_wrappers && incremental_marking()->IsMarking()) { |
- IncrementalMarking::MarkGrey(this, heap_object); |
+ incremental_marking()->MarkGrey(heap_object); |
} else { |
DCHECK(mark_compact_collector()->in_use()); |
mark_compact_collector()->MarkObject(heap_object); |