Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(996)

Unified Diff: src/store-buffer.cc

Issue 413693002: Use heap iterator in store buffer when page was swept precisely. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/store-buffer.cc
diff --git a/src/store-buffer.cc b/src/store-buffer.cc
index d1a04d292fb2cb0f79282972caa0b26c8d3b8c2f..dbd9cc7415e04b47bf57f3aedf8143ff3dfb9930 100644
--- a/src/store-buffer.cc
+++ b/src/store-buffer.cc
@@ -515,8 +515,25 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback,
heap_->mark_compact_collector()->EnsureSweepingCompleted();
}
}
- FindPointersToNewSpaceInRegion(
- start, end, slot_callback, clear_maps);
+ // TODO(hpayer): remove the special casing and merge map and pointer
+ // space handling as soon as we removed conservative sweeping.
+ CHECK(page->owner() == heap_->old_pointer_space());
+ if (heap_->old_pointer_space()->swept_precisely()) {
+ HeapObjectIterator iterator(page, NULL);
+ for (HeapObject* heap_object = iterator.Next();
+ heap_object != NULL; heap_object = iterator.Next()) {
+ // We iterate over objects that contain new space pointers only.
+ if (heap_object->MayContainNewSpacePointers()) {
+ FindPointersToNewSpaceInRegion(
+ heap_object->address() + HeapObject::kHeaderSize,
+ heap_object->address() + heap_object->Size(),
+ slot_callback, clear_maps);
+ }
+ }
+ } else {
+ FindPointersToNewSpaceInRegion(start, end, slot_callback,
+ clear_maps);
+ }
}
}
}
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698