Chromium Code Reviews| Index: src/heap/store-buffer.cc |
| diff --git a/src/heap/store-buffer.cc b/src/heap/store-buffer.cc |
| index 5fd4ce34f3aee6913c42fe3c292b1dea5f0ea8ab..bb9234d21b420f49410d3b779cf00f3c5d7c211f 100644 |
| --- a/src/heap/store-buffer.cc |
| +++ b/src/heap/store-buffer.cc |
| @@ -510,24 +510,29 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback, |
| bool may_contain_raw_values = heap_object->MayContainRawValues(); |
| if (!may_contain_raw_values) { |
| Address obj_address = heap_object->address(); |
| - Address start_address = obj_address + HeapObject::kHeaderSize; |
| - Address end_address = obj_address + heap_object->Size(); |
| + const int start_offset = HeapObject::kHeaderSize; |
| + const int end_offset = heap_object->Size(); |
| #if V8_DOUBLE_FIELDS_UNBOXING |
| - InobjectPropertiesHelper helper(heap_object->map()); |
| + LayoutDescriptorHelper helper(heap_object->map()); |
| bool has_only_tagged_fields = helper.all_fields_tagged(); |
| if (!has_only_tagged_fields) { |
| - for (Address slot = start_address; slot < end_address; |
| - slot += kPointerSize) { |
| - if (helper.IsTagged(static_cast<int>(slot - obj_address))) { |
| - // TODO(ishell): call this once for contiguous region |
| - // of tagged fields. |
| - FindPointersToNewSpaceInRegion(slot, slot + kPointerSize, |
| - slot_callback, clear_maps); |
| + for (int offset = start_offset; offset < end_offset;) { |
| + int end_of_region_offset; |
| + if (helper.IsTagged(offset, end_offset, |
| + &end_of_region_offset)) { |
| + FindPointersToNewSpaceInRegion( |
| + obj_address + offset, |
| + obj_address + end_of_region_offset, slot_callback, |
| + clear_maps); |
| } |
| + DCHECK(offset < end_of_region_offset); |
|
Hannes Payer (out of office)
2014/11/25 17:20:13
I think that DCHECK should be in the IsTagged func
Igor Sheludko
2014/12/10 18:22:04
Done.
|
| + offset = end_of_region_offset; |
| } |
| } else { |
| #endif |
| + Address start_address = obj_address + start_offset; |
| + Address end_address = obj_address + end_offset; |
| // Object has only tagged fields. |
| FindPointersToNewSpaceInRegion(start_address, end_address, |
| slot_callback, clear_maps); |