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

Unified Diff: src/spaces.cc

Issue 377863003: Reland "Precisely sweep scan on scavenge pages and use heap iterator to iterate over them." (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') | src/store-buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.cc
diff --git a/src/spaces.cc b/src/spaces.cc
index 560c7d87188e052ec5941f56cceb8a78cee7d7b9..12613c7cb0fc4898d9a5ca172deda517d56a2922 100644
--- a/src/spaces.cc
+++ b/src/spaces.cc
@@ -18,6 +18,9 @@ namespace internal {
// HeapObjectIterator
HeapObjectIterator::HeapObjectIterator(PagedSpace* space) {
+ // Check that we actually can iterate this space.
+ ASSERT(space->is_iterable());
+
// You can't actually iterate over the anchor page. It is not a real page,
// just an anchor for the double linked page list. Initialize as if we have
// reached the end of the anchor page, then the first iteration will move on
@@ -32,6 +35,9 @@ HeapObjectIterator::HeapObjectIterator(PagedSpace* space) {
HeapObjectIterator::HeapObjectIterator(PagedSpace* space,
HeapObjectCallback size_func) {
+ // Check that we actually can iterate this space.
+ ASSERT(space->is_iterable());
+
// You can't actually iterate over the anchor page. It is not a real page,
// just an anchor for the double linked page list. Initialize the current
// address and end as NULL, then the first iteration will move on
@@ -66,9 +72,6 @@ void HeapObjectIterator::Initialize(PagedSpace* space,
Address cur, Address end,
HeapObjectIterator::PageMode mode,
HeapObjectCallback size_f) {
- // Check that we actually can iterate this space.
- ASSERT(space->is_iterable());
-
space_ = space;
cur_addr_ = cur;
cur_end_ = end;
« no previous file with comments | « src/objects-inl.h ('k') | src/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698