| Index: src/heap/spaces.h
|
| diff --git a/src/heap/spaces.h b/src/heap/spaces.h
|
| index 37d43b17c4c72f8ff482f6192466f6f4d16d8672..0981c3650efe8d9b6fa6b55ac4e8b06de811e6b5 100644
|
| --- a/src/heap/spaces.h
|
| +++ b/src/heap/spaces.h
|
| @@ -425,10 +425,6 @@
|
| // from new to old space during evacuation.
|
| PAGE_NEW_OLD_PROMOTION,
|
|
|
| - // |PAGE_NEW_NEW_PROMOTION|: A page tagged with this flag has been moved
|
| - // within the new space during evacuation.
|
| - PAGE_NEW_NEW_PROMOTION,
|
| -
|
| // A black page has all mark bits set to 1 (black). A black page currently
|
| // cannot be iterated because it is not swept. Moreover live bytes are also
|
| // not updated.
|
| @@ -2435,8 +2431,6 @@
|
| // than the current capacity.
|
| bool ShrinkTo(int new_capacity);
|
|
|
| - bool EnsureCurrentCapacity();
|
| -
|
| // Returns the start address of the first page of the space.
|
| Address space_start() {
|
| DCHECK_NE(anchor_.next_page(), anchor());
|
| @@ -2465,8 +2459,7 @@
|
| // Resets the space to using the first page.
|
| void Reset();
|
|
|
| - void RemovePage(Page* page);
|
| - void PrependPage(Page* page);
|
| + bool ReplaceWithEmptyPage(Page* page);
|
|
|
| // Age mark accessors.
|
| Address age_mark() { return age_mark_; }
|
| @@ -2542,9 +2535,8 @@
|
| Page anchor_;
|
| Page* current_page_;
|
|
|
| - friend class NewSpace;
|
| + friend class SemiSpaceIterator;
|
| friend class NewSpacePageIterator;
|
| - friend class SemiSpaceIterator;
|
| };
|
|
|
|
|
| @@ -2723,14 +2715,11 @@
|
| return static_cast<size_t>(allocated);
|
| }
|
|
|
| - void MovePageFromSpaceToSpace(Page* page) {
|
| + bool ReplaceWithEmptyPage(Page* page) {
|
| + // This method is called after flipping the semispace.
|
| DCHECK(page->InFromSpace());
|
| - from_space_.RemovePage(page);
|
| - to_space_.PrependPage(page);
|
| - pages_used_++;
|
| - }
|
| -
|
| - bool Rebalance();
|
| + return from_space_.ReplaceWithEmptyPage(page);
|
| + }
|
|
|
| // Return the maximum capacity of a semispace.
|
| int MaximumCapacity() {
|
|
|