Index: src/heap/objects-visiting.h |
diff --git a/src/heap/objects-visiting.h b/src/heap/objects-visiting.h |
index 30054f058afbfb413cac4336881f6f763aa01eda..f8c58dd8169f657bd0a223fbc6b4cab2caf2e1ef 100644 |
--- a/src/heap/objects-visiting.h |
+++ b/src/heap/objects-visiting.h |
@@ -226,16 +226,14 @@ class BodyVisitorBase : public AllStatic { |
DCHECK(IsAligned(start_offset, kPointerSize) && |
IsAligned(end_offset, kPointerSize)); |
- InobjectPropertiesHelper helper(object->map()); |
+ LayoutDescriptorHelper helper(object->map()); |
DCHECK(!helper.all_fields_tagged()); |
- |
- for (int offset = start_offset; offset < end_offset; |
- offset += kPointerSize) { |
- // Visit tagged fields only. |
- if (helper.IsTagged(offset)) { |
- // TODO(ishell): call this once for contiguous region of tagged fields. |
- IterateRawPointers(heap, object, offset, offset + kPointerSize); |
+ for (int offset = start_offset; offset < end_offset;) { |
+ int end_of_region_offset; |
+ if (helper.IsTagged(offset, end_offset, &end_of_region_offset)) { |
+ IterateRawPointers(heap, object, offset, end_of_region_offset); |
} |
+ offset = end_of_region_offset; |
} |
} |
}; |