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

Unified Diff: src/spaces-inl.h

Issue 555072: Merge ObjectIterator::has_next and ObjectIterator::next methods.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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/spaces.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces-inl.h
===================================================================
--- src/spaces-inl.h (revision 3683)
+++ src/spaces-inl.h (working copy)
@@ -36,32 +36,6 @@
// -----------------------------------------------------------------------------
-// HeapObjectIterator
-
-bool HeapObjectIterator::has_next() {
- if (cur_addr_ < cur_limit_) {
- return true; // common case
- }
- ASSERT(cur_addr_ == cur_limit_);
- return HasNextInNextPage(); // slow path
-}
-
-
-HeapObject* HeapObjectIterator::next() {
- ASSERT(has_next());
-
- HeapObject* obj = HeapObject::FromAddress(cur_addr_);
- int obj_size = (size_func_ == NULL) ? obj->Size() : size_func_(obj);
- ASSERT_OBJECT_SIZE(obj_size);
-
- cur_addr_ += obj_size;
- ASSERT(cur_addr_ <= cur_limit_);
-
- return obj;
-}
-
-
-// -----------------------------------------------------------------------------
// PageIterator
bool PageIterator::has_next() {
« no previous file with comments | « src/spaces.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698