| Index: src/heap/spaces.cc
|
| diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
|
| index 8982a2953273abbe35993b57ab63ee43d42ae0d7..467f0c921602ba13c7e751ceecb1aa4b684ade59 100644
|
| --- a/src/heap/spaces.cc
|
| +++ b/src/heap/spaces.cc
|
| @@ -1430,6 +1430,10 @@ void PagedSpace::ReleasePage(Page* page) {
|
| heap()->memory_allocator()->Free<MemoryAllocator::kPreFreeAndQueue>(page);
|
| }
|
|
|
| +std::unique_ptr<ObjectIterator> PagedSpace::GetObjectIterator() {
|
| + return std::unique_ptr<ObjectIterator>(new HeapObjectIterator(this));
|
| +}
|
| +
|
| #ifdef DEBUG
|
| void PagedSpace::Print() {}
|
| #endif
|
| @@ -1816,6 +1820,10 @@ void NewSpace::InlineAllocationStep(Address top, Address new_top,
|
| }
|
| }
|
|
|
| +std::unique_ptr<ObjectIterator> NewSpace::GetObjectIterator() {
|
| + return std::unique_ptr<ObjectIterator>(new SemiSpaceIterator(this));
|
| +}
|
| +
|
| #ifdef VERIFY_HEAP
|
| // We do not use the SemiSpaceIterator because verification doesn't assume
|
| // that it works (it depends on the invariants we are checking).
|
| @@ -2089,6 +2097,11 @@ void SemiSpace::set_age_mark(Address mark) {
|
| }
|
| }
|
|
|
| +std::unique_ptr<ObjectIterator> SemiSpace::GetObjectIterator() {
|
| + // Use the NewSpace::NewObjectIterator to iterate the ToSpace.
|
| + UNREACHABLE();
|
| + return std::unique_ptr<ObjectIterator>();
|
| +}
|
|
|
| #ifdef DEBUG
|
| void SemiSpace::Print() {}
|
| @@ -3141,6 +3154,9 @@ bool LargeObjectSpace::Contains(HeapObject* object) {
|
| return owned;
|
| }
|
|
|
| +std::unique_ptr<ObjectIterator> LargeObjectSpace::GetObjectIterator() {
|
| + return std::unique_ptr<ObjectIterator>(new LargeObjectIterator(this));
|
| +}
|
|
|
| #ifdef VERIFY_HEAP
|
| // We do not assume that the large object iterator works, because it depends
|
|
|