Index: src/heap/objects-visiting-inl.h |
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h |
index b8c255e1f399e5e3889d3026ab53fa83a66ffa90..252b2fe5e2fb7b898bc6e21f86981465764b9930 100644 |
--- a/src/heap/objects-visiting-inl.h |
+++ b/src/heap/objects-visiting-inl.h |
@@ -449,11 +449,11 @@ void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( |
// optimized code. |
collector->code_flusher()->AddCandidate(shared); |
// Treat the reference to the code object weakly. |
- VisitSharedFunctionInfoWeakCode(heap, object); |
+ VisitSharedFunctionInfoWeakCode(map, object); |
return; |
} |
} |
- VisitSharedFunctionInfoStrongCode(heap, object); |
+ VisitSharedFunctionInfoStrongCode(map, object); |
} |
@@ -621,39 +621,23 @@ bool StaticMarkingVisitor<StaticVisitor>::IsFlushable( |
return true; |
} |
- |
template <typename StaticVisitor> |
void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfoStrongCode( |
- Heap* heap, HeapObject* object) { |
- Object** start_slot = HeapObject::RawField( |
- object, SharedFunctionInfo::BodyDescriptor::kStartOffset); |
- Object** end_slot = HeapObject::RawField( |
- object, SharedFunctionInfo::BodyDescriptor::kEndOffset); |
- StaticVisitor::VisitPointers(heap, object, start_slot, end_slot); |
+ Map* map, HeapObject* object) { |
+ FixedBodyVisitor<StaticVisitor, SharedFunctionInfo::BodyDescriptor, |
+ void>::Visit(map, object); |
} |
- |
template <typename StaticVisitor> |
void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfoWeakCode( |
- Heap* heap, HeapObject* object) { |
- Object** name_slot = |
- HeapObject::RawField(object, SharedFunctionInfo::kNameOffset); |
- StaticVisitor::VisitPointer(heap, object, name_slot); |
- |
+ Map* map, HeapObject* object) { |
// Skip visiting kCodeOffset as it is treated weakly here. |
- STATIC_ASSERT(SharedFunctionInfo::kNameOffset + kPointerSize == |
- SharedFunctionInfo::kCodeOffset); |
- STATIC_ASSERT(SharedFunctionInfo::kCodeOffset + kPointerSize == |
- SharedFunctionInfo::kOptimizedCodeMapOffset); |
- |
- Object** start_slot = |
- HeapObject::RawField(object, SharedFunctionInfo::kOptimizedCodeMapOffset); |
- Object** end_slot = HeapObject::RawField( |
- object, SharedFunctionInfo::BodyDescriptor::kEndOffset); |
- StaticVisitor::VisitPointers(heap, object, start_slot, end_slot); |
+ STATIC_ASSERT(SharedFunctionInfo::kCodeOffset < |
+ SharedFunctionInfo::BodyDescriptorWeakCode::kStartOffset); |
+ FixedBodyVisitor<StaticVisitor, SharedFunctionInfo::BodyDescriptorWeakCode, |
+ void>::Visit(map, object); |
} |
- |
template <typename StaticVisitor> |
void StaticMarkingVisitor<StaticVisitor>::VisitJSFunctionStrongCode( |
Map* map, HeapObject* object) { |