Chromium Code Reviews| Index: src/heap/incremental-marking.cc |
| diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc |
| index 947c961af8993d6efc959d4d1c7765a1c2e352a1..e1e7a38e6d7950a93b96c2b5ec4a20ff9afa1b91 100644 |
| --- a/src/heap/incremental-marking.cc |
| +++ b/src/heap/incremental-marking.cc |
| @@ -40,8 +40,7 @@ void IncrementalMarking::RecordWriteSlow(HeapObject* obj, Object** slot, |
| MarkBit obj_bit = Marking::MarkBitFrom(obj); |
| if (Marking::IsBlack(obj_bit)) { |
| // Object is not going to be rescanned we need to record the slot. |
| - heap_->mark_compact_collector()->RecordSlot(HeapObject::RawField(obj, 0), |
| - slot, value); |
| + heap_->mark_compact_collector()->RecordSlot(obj, slot, value); |
| } |
| } |
| } |
| @@ -92,7 +91,7 @@ void IncrementalMarking::RecordWriteOfCodeEntrySlow(JSFunction* host, |
| if (BaseRecordWrite(host, slot, value)) { |
| DCHECK(slot != NULL); |
| heap_->mark_compact_collector()->RecordCodeEntrySlot( |
| - reinterpret_cast<Address>(slot), value); |
| + host, reinterpret_cast<Address>(slot), value); |
| } |
| } |
| @@ -177,9 +176,8 @@ class IncrementalMarkingMarkingVisitor |
| int already_scanned_offset = start_offset; |
| bool scan_until_end = false; |
| do { |
| - VisitPointersWithAnchor(heap, HeapObject::RawField(object, 0), |
| - HeapObject::RawField(object, start_offset), |
| - HeapObject::RawField(object, end_offset)); |
| + VisitPointers(heap, object, HeapObject::RawField(object, start_offset), |
| + HeapObject::RawField(object, end_offset)); |
| start_offset = end_offset; |
| end_offset = Min(object_size, end_offset + kProgressBarScanningChunk); |
| scan_until_end = |
| @@ -214,30 +212,20 @@ class IncrementalMarkingMarkingVisitor |
| VisitNativeContext(map, context); |
| } |
| - INLINE(static void VisitPointer(Heap* heap, Object** p)) { |
| + INLINE(static void VisitPointer(Heap* heap, HeapObject* object, Object** p)) { |
| Object* obj = *p; |
|
ulan
2015/08/04 16:09:22
s/obj/target here and in the function below to avo
Hannes Payer (out of office)
2015/08/04 16:16:21
Done.
|
| if (obj->IsHeapObject()) { |
| - heap->mark_compact_collector()->RecordSlot(p, p, obj); |
| + heap->mark_compact_collector()->RecordSlot(object, p, obj); |
| MarkObject(heap, obj); |
| } |
| } |
| - INLINE(static void VisitPointers(Heap* heap, Object** start, Object** end)) { |
| + INLINE(static void VisitPointers(Heap* heap, HeapObject* object, |
| + Object** start, Object** end)) { |
| for (Object** p = start; p < end; p++) { |
| Object* obj = *p; |
| if (obj->IsHeapObject()) { |
| - heap->mark_compact_collector()->RecordSlot(start, p, obj); |
| - MarkObject(heap, obj); |
| - } |
| - } |
| - } |
| - |
| - INLINE(static void VisitPointersWithAnchor(Heap* heap, Object** anchor, |
| - Object** start, Object** end)) { |
| - for (Object** p = start; p < end; p++) { |
| - Object* obj = *p; |
| - if (obj->IsHeapObject()) { |
| - heap->mark_compact_collector()->RecordSlot(anchor, p, obj); |
| + heap->mark_compact_collector()->RecordSlot(object, p, obj); |
| MarkObject(heap, obj); |
| } |
| } |