| Index: src/heap/objects-visiting-inl.h
|
| diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h
|
| index c415713ee3f1c04ebc4713292d4289369f0a5624..d71c879a739ec93eba1f5443b97f463f3064514d 100644
|
| --- a/src/heap/objects-visiting-inl.h
|
| +++ b/src/heap/objects-visiting-inl.h
|
| @@ -220,12 +220,11 @@ void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer(
|
| Heap* heap, RelocInfo* rinfo) {
|
| DCHECK(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT);
|
| HeapObject* object = HeapObject::cast(rinfo->target_object());
|
| - Code* host = rinfo->host();
|
| - heap->mark_compact_collector()->RecordRelocSlot(host, rinfo, object);
|
| + heap->mark_compact_collector()->RecordRelocSlot(rinfo, object);
|
| // TODO(ulan): It could be better to record slots only for strongly embedded
|
| // objects here and record slots for weakly embedded object during clearing
|
| // of non-live references in mark-compact.
|
| - if (!host->IsWeakObject(object)) {
|
| + if (!rinfo->host()->IsWeakObject(object)) {
|
| StaticVisitor::MarkObject(heap, object);
|
| }
|
| }
|
| @@ -236,9 +235,8 @@ void StaticMarkingVisitor<StaticVisitor>::VisitCell(Heap* heap,
|
| RelocInfo* rinfo) {
|
| DCHECK(rinfo->rmode() == RelocInfo::CELL);
|
| Cell* cell = rinfo->target_cell();
|
| - Code* host = rinfo->host();
|
| - heap->mark_compact_collector()->RecordRelocSlot(host, rinfo, cell);
|
| - if (!host->IsWeakObject(cell)) {
|
| + heap->mark_compact_collector()->RecordRelocSlot(rinfo, cell);
|
| + if (!rinfo->host()->IsWeakObject(cell)) {
|
| StaticVisitor::MarkObject(heap, cell);
|
| }
|
| }
|
| @@ -250,8 +248,7 @@ void StaticMarkingVisitor<StaticVisitor>::VisitDebugTarget(Heap* heap,
|
| DCHECK(RelocInfo::IsDebugBreakSlot(rinfo->rmode()) &&
|
| rinfo->IsPatchedDebugBreakSlotSequence());
|
| Code* target = Code::GetCodeFromTargetAddress(rinfo->debug_call_address());
|
| - Code* host = rinfo->host();
|
| - heap->mark_compact_collector()->RecordRelocSlot(host, rinfo, target);
|
| + heap->mark_compact_collector()->RecordRelocSlot(rinfo, target);
|
| StaticVisitor::MarkObject(heap, target);
|
| }
|
|
|
| @@ -271,8 +268,7 @@ void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget(Heap* heap,
|
| rinfo->host()->constant_pool());
|
| target = Code::GetCodeFromTargetAddress(rinfo->target_address());
|
| }
|
| - Code* host = rinfo->host();
|
| - heap->mark_compact_collector()->RecordRelocSlot(host, rinfo, target);
|
| + heap->mark_compact_collector()->RecordRelocSlot(rinfo, target);
|
| StaticVisitor::MarkObject(heap, target);
|
| }
|
|
|
| @@ -283,8 +279,7 @@ void StaticMarkingVisitor<StaticVisitor>::VisitCodeAgeSequence(
|
| DCHECK(RelocInfo::IsCodeAgeSequence(rinfo->rmode()));
|
| Code* target = rinfo->code_age_stub();
|
| DCHECK(target != NULL);
|
| - Code* host = rinfo->host();
|
| - heap->mark_compact_collector()->RecordRelocSlot(host, rinfo, target);
|
| + heap->mark_compact_collector()->RecordRelocSlot(rinfo, target);
|
| StaticVisitor::MarkObject(heap, target);
|
| }
|
|
|
|
|