| Index: src/heap/spaces.h
|
| diff --git a/src/heap/spaces.h b/src/heap/spaces.h
|
| index 5832cc68559a1ed5c11dd5feeed53f12e2129fad..99dd378bbe0b2b2af5c097278b14dade084ed669 100644
|
| --- a/src/heap/spaces.h
|
| +++ b/src/heap/spaces.h
|
| @@ -943,6 +943,8 @@ class Space : public Malloced {
|
| }
|
| }
|
|
|
| + virtual std::unique_ptr<ObjectIterator> GetObjectIterator() = 0;
|
| +
|
| void AccountCommitted(intptr_t bytes) {
|
| DCHECK_GE(bytes, 0);
|
| committed_ += bytes;
|
| @@ -2154,6 +2156,8 @@ class PagedSpace : public Space {
|
| // using the high water mark.
|
| void ShrinkImmortalImmovablePages();
|
|
|
| + std::unique_ptr<ObjectIterator> GetObjectIterator() override;
|
| +
|
| protected:
|
| // PagedSpaces that should be included in snapshots have different, i.e.,
|
| // smaller, initial pages.
|
| @@ -2329,6 +2333,11 @@ class SemiSpace : public Space {
|
| return 0;
|
| }
|
|
|
| + iterator begin() { return iterator(anchor_.next_page()); }
|
| + iterator end() { return iterator(anchor()); }
|
| +
|
| + std::unique_ptr<ObjectIterator> GetObjectIterator() override;
|
| +
|
| #ifdef DEBUG
|
| void Print() override;
|
| // Validate a range of of addresses in a SemiSpace.
|
| @@ -2344,9 +2353,6 @@ class SemiSpace : public Space {
|
| virtual void Verify();
|
| #endif
|
|
|
| - iterator begin() { return iterator(anchor_.next_page()); }
|
| - iterator end() { return iterator(anchor()); }
|
| -
|
| private:
|
| void RewindPages(Page* start, int num_pages);
|
|
|
| @@ -2648,6 +2654,8 @@ class NewSpace : public Space {
|
| iterator begin() { return to_space_.begin(); }
|
| iterator end() { return to_space_.end(); }
|
|
|
| + std::unique_ptr<ObjectIterator> GetObjectIterator() override;
|
| +
|
| private:
|
| // Update allocation info to match the current to-space page.
|
| void UpdateAllocationInfo();
|
| @@ -2863,6 +2871,8 @@ class LargeObjectSpace : public Space {
|
| iterator begin() { return iterator(first_page_); }
|
| iterator end() { return iterator(nullptr); }
|
|
|
| + std::unique_ptr<ObjectIterator> GetObjectIterator() override;
|
| +
|
| #ifdef VERIFY_HEAP
|
| virtual void Verify();
|
| #endif
|
|
|