Chromium Code Reviews| Index: src/objects-visiting-inl.h |
| diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h |
| index 46cc9d7989297adb4763f878179c77f49f07e387..08f1d10d3777deef2a2471d46157a83582f29aa7 100644 |
| --- a/src/objects-visiting-inl.h |
| +++ b/src/objects-visiting-inl.h |
| @@ -185,6 +185,8 @@ void StaticMarkingVisitor<StaticVisitor>::Initialize() { |
| table_.Register(kVisitFixedDoubleArray, &DataObjectVisitor::Visit); |
| + table_.Register(kVisitConstantPoolArray, &VisitConstantPoolArray); |
| + |
| table_.Register(kVisitNativeContext, &VisitNativeContext); |
| table_.Register(kVisitAllocationSite, |
| @@ -269,7 +271,6 @@ void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer( |
| } |
| } |
| - |
| template<typename StaticVisitor> |
| void StaticMarkingVisitor<StaticVisitor>::VisitCell( |
| Heap* heap, RelocInfo* rinfo) { |
| @@ -451,6 +452,32 @@ void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( |
| } |
| +void ConstantPoolArray::ConstantPoolIterateBody(ObjectVisitor* v) { |
|
ulan
2013/09/27 12:39:10
Better to move it in object.cc or object-inl.h
rmcilroy
2013/10/01 11:21:52
Moved to objects.cc.
|
| + int first_ptr_offset = OffsetOfElementAt(first_ptr_index()); |
| + int last_ptr_offset = |
| + OffsetOfElementAt(first_ptr_index() + count_of_ptr_entries()); |
| + v->VisitPointers( |
| + HeapObject::RawField(this, first_ptr_offset), |
| + HeapObject::RawField(this, last_ptr_offset)); |
| +} |
| + |
| + |
| +template<typename StaticVisitor> |
| +void StaticMarkingVisitor<StaticVisitor>::VisitConstantPoolArray( |
| + Map* map, HeapObject* object) { |
| + Heap* heap = map->GetHeap(); |
| + ConstantPoolArray* constant_pool = ConstantPoolArray::cast(object); |
| + int first_ptr_offset = constant_pool->OffsetOfElementAt( |
| + constant_pool->first_ptr_index()); |
| + int last_ptr_offset = constant_pool->OffsetOfElementAt( |
| + constant_pool->first_ptr_index() + constant_pool->count_of_ptr_entries()); |
| + StaticVisitor::VisitPointers( |
| + heap, |
| + HeapObject::RawField(object, first_ptr_offset), |
| + HeapObject::RawField(object, last_ptr_offset)); |
| +} |
| + |
| + |
| template<typename StaticVisitor> |
| void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction( |
| Map* map, HeapObject* object) { |