Index: src/store-buffer.cc |
diff --git a/src/store-buffer.cc b/src/store-buffer.cc |
index 4ab5c33c8cc439b59033c85c4be1ae5b92c67d49..a21ac2a76ea2d4d2c29ea42b4bf7d9ca4074263c 100644 |
--- a/src/store-buffer.cc |
+++ b/src/store-buffer.cc |
@@ -417,49 +417,6 @@ static inline Address MapEndAlign(Address addr) { |
} |
-void StoreBuffer::FindPointersToNewSpaceInMaps( |
- Address start, |
- Address end, |
- ObjectSlotCallback slot_callback, |
- bool clear_maps) { |
- ASSERT(MapStartAlign(start) == start); |
- ASSERT(MapEndAlign(end) == end); |
- |
- Address map_address = start; |
- while (map_address < end) { |
- ASSERT(!heap_->InNewSpace(Memory::Object_at(map_address))); |
- ASSERT(Memory::Object_at(map_address)->IsMap()); |
- |
- Address pointer_fields_start = map_address + Map::kPointerFieldsBeginOffset; |
- Address pointer_fields_end = map_address + Map::kPointerFieldsEndOffset; |
- |
- FindPointersToNewSpaceInRegion(pointer_fields_start, |
- pointer_fields_end, |
- slot_callback, |
- clear_maps); |
- map_address += Map::kSize; |
- } |
-} |
- |
- |
-void StoreBuffer::FindPointersToNewSpaceInMapsRegion( |
- Address start, |
- Address end, |
- ObjectSlotCallback slot_callback, |
- bool clear_maps) { |
- Address map_aligned_start = MapStartAlign(start); |
- Address map_aligned_end = MapEndAlign(end); |
- |
- ASSERT(map_aligned_start == start); |
- ASSERT(map_aligned_start <= map_aligned_end && map_aligned_end <= end); |
- |
- FindPointersToNewSpaceInMaps(map_aligned_start, |
- map_aligned_end, |
- slot_callback, |
- clear_maps); |
-} |
- |
- |
void StoreBuffer::IteratePointersInStoreBuffer( |
ObjectSlotCallback slot_callback, |
bool clear_maps) { |
@@ -549,8 +506,18 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback, |
Address start = page->area_start(); |
Address end = page->area_end(); |
if (owner == heap_->map_space()) { |
- FindPointersToNewSpaceInMapsRegion( |
- start, end, slot_callback, clear_maps); |
+ ASSERT(page->WasSweptPrecisely()); |
+ HeapObjectIterator iterator(page, NULL); |
+ for (HeapObject* heap_object = iterator.Next(); heap_object != NULL; |
+ heap_object = iterator.Next()) { |
+ // We skip free space objects. |
+ if (!heap_object->IsFiller()) { |
+ FindPointersToNewSpaceInRegion( |
+ heap_object->address() + HeapObject::kHeaderSize, |
+ heap_object->address() + heap_object->Size(), slot_callback, |
+ clear_maps); |
+ } |
+ } |
} else { |
FindPointersToNewSpaceInRegion( |
start, end, slot_callback, clear_maps); |