Index: runtime/vm/raw_object.cc |
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc |
index 04378e71a9bef9fdda6a42bda2119b5fb7c44436..67f0afc13733f31483bd1737916cfa10678c363d 100644 |
--- a/runtime/vm/raw_object.cc |
+++ b/runtime/vm/raw_object.cc |
@@ -115,6 +115,13 @@ intptr_t RawObject::SizeFromClass() const { |
instance_size = Array::InstanceSize(array_length); |
break; |
} |
+ case kObjectPoolCid: { |
+ const RawObjectPool* raw_object_pool = |
+ reinterpret_cast<const RawObjectPool*>(this); |
+ intptr_t len = raw_object_pool->ptr()->length_; |
+ instance_size = ObjectPool::InstanceSize(len); |
+ break; |
+ } |
#define SIZE_FROM_CLASS(clazz) \ |
case kTypedData##clazz##Cid: |
CLASS_LIST_TYPED_DATA(SIZE_FROM_CLASS) { |
@@ -523,6 +530,24 @@ intptr_t RawCode::VisitCodePointers(RawCode* raw_obj, |
} |
+intptr_t RawObjectPool::VisitObjectPoolPointers( |
+ RawObjectPool* raw_obj, ObjectPointerVisitor* visitor) { |
+ visitor->VisitPointer( |
+ reinterpret_cast<RawObject**>(&raw_obj->ptr()->info_array_)); |
+ const intptr_t len = raw_obj->ptr()->length_; |
+ RawTypedData* info_array = raw_obj->ptr()->info_array_->ptr(); |
+ Entry* first = raw_obj->first_entry(); |
+ for (intptr_t i = 0; i < len; ++i) { |
+ ObjectPool::EntryType entry_type = |
+ static_cast<ObjectPool::EntryType>(info_array->data()[i]); |
+ if (entry_type == ObjectPool::kTaggedObject) { |
+ visitor->VisitPointer(&(first + i)->raw_obj_); |
+ } |
+ } |
+ return ObjectPool::InstanceSize(raw_obj->ptr()->length_); |
+} |
+ |
+ |
intptr_t RawInstructions::VisitInstructionsPointers( |
RawInstructions* raw_obj, ObjectPointerVisitor* visitor) { |
RawInstructions* obj = raw_obj->ptr(); |