Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 108f9f62489ad62b492ce22a748826a81baee62f..f3ac5717cd25bc9a56d811b10a2959352a02bfb8 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -5220,6 +5220,12 @@ LayoutDescriptor* Map::layout_descriptor_gc_safe() { |
} |
+bool Map::HasFastPointerLayout() const { |
+ Object* layout_desc = READ_FIELD(this, kLayoutDecriptorOffset); |
+ return LayoutDescriptor::IsFastPointerLayout(layout_desc); |
+} |
+ |
+ |
void Map::UpdateDescriptors(DescriptorArray* descriptors, |
LayoutDescriptor* layout_desc) { |
set_instance_descriptors(descriptors); |
@@ -7357,8 +7363,7 @@ template<int start_offset, int end_offset, int size> |
void FixedBodyDescriptor<start_offset, end_offset, size>::IterateBody( |
HeapObject* obj, |
ObjectVisitor* v) { |
- if (!FLAG_unbox_double_fields || |
- obj->map()->layout_descriptor()->IsFastPointerLayout()) { |
Igor Sheludko
2014/11/24 09:32:10
It is not correct to call here layout_descriptor()
|
+ if (!FLAG_unbox_double_fields || obj->map()->HasFastPointerLayout()) { |
v->VisitPointers(HeapObject::RawField(obj, start_offset), |
HeapObject::RawField(obj, end_offset)); |
} else { |
@@ -7371,8 +7376,7 @@ template<int start_offset> |
void FlexibleBodyDescriptor<start_offset>::IterateBody(HeapObject* obj, |
int object_size, |
ObjectVisitor* v) { |
- if (!FLAG_unbox_double_fields || |
- obj->map()->layout_descriptor()->IsFastPointerLayout()) { |
+ if (!FLAG_unbox_double_fields || obj->map()->HasFastPointerLayout()) { |
v->VisitPointers(HeapObject::RawField(obj, start_offset), |
HeapObject::RawField(obj, object_size)); |
} else { |