| Index: src/heap/spaces-inl.h
|
| diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h
|
| index eefbc711757b2d106e824986e6f411d3c652e8c9..1567a8790d26ce5d0c88bd86847299cca5985fdf 100644
|
| --- a/src/heap/spaces-inl.h
|
| +++ b/src/heap/spaces-inl.h
|
| @@ -28,14 +28,10 @@
|
| return tmp;
|
| }
|
|
|
| -PageRange::PageRange(Address start, Address limit)
|
| - : begin_(Page::FromAllocationAreaAddress(start)),
|
| - end_(Page::FromAllocationAreaAddress(limit)->next_page()) {
|
| -#ifdef DEBUG
|
| - if (begin_->InNewSpace()) {
|
| - SemiSpace::AssertValidRange(start, limit);
|
| - }
|
| -#endif // DEBUG
|
| +NewSpacePageRange::NewSpacePageRange(Address start, Address limit)
|
| + : range_(Page::FromAddress(start),
|
| + Page::FromAllocationAreaAddress(limit)->next_page()) {
|
| + SemiSpace::AssertValidRange(start, limit);
|
| }
|
|
|
| // -----------------------------------------------------------------------------
|
| @@ -72,14 +68,8 @@
|
|
|
| HeapObject* HeapObjectIterator::FromCurrentPage() {
|
| while (cur_addr_ != cur_end_) {
|
| - // When the current address equals top we have to handle two scenarios:
|
| - // - Old space page: Move forward to limit if top != limit. We will find
|
| - // a filler following limit.
|
| - // - New space page: We have to stop iteration before the linear allocation
|
| - // area as there are no fillers behind it.
|
| - if (cur_addr_ == space_->top() &&
|
| - (cur_addr_ != space_->limit() || current_page()->InNewSpace())) {
|
| - cur_addr_ = current_page()->InNewSpace() ? cur_end_ : space_->limit();
|
| + if (cur_addr_ == space_->top() && cur_addr_ != space_->limit()) {
|
| + cur_addr_ = space_->limit();
|
| continue;
|
| }
|
| HeapObject* obj = HeapObject::FromAddress(cur_addr_);
|
| @@ -89,7 +79,7 @@
|
| if (!obj->IsFiller()) {
|
| if (obj->IsCode()) {
|
| DCHECK_EQ(space_, space_->heap()->code_space());
|
| - DCHECK_CODEOBJECT_SIZE(obj_size, reinterpret_cast<PagedSpace*>(space_));
|
| + DCHECK_CODEOBJECT_SIZE(obj_size, space_);
|
| } else {
|
| DCHECK_OBJECT_SIZE(obj_size);
|
| }
|
|
|