OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/heap/heap.h" | 5 #include "src/heap/heap.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 5918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5929 HeapObject* obj = NextObject(); | 5929 HeapObject* obj = NextObject(); |
5930 while ((obj != nullptr) && (filter_->SkipObject(obj))) obj = NextObject(); | 5930 while ((obj != nullptr) && (filter_->SkipObject(obj))) obj = NextObject(); |
5931 return obj; | 5931 return obj; |
5932 } | 5932 } |
5933 | 5933 |
5934 | 5934 |
5935 HeapObject* HeapIterator::NextObject() { | 5935 HeapObject* HeapIterator::NextObject() { |
5936 // No iterator means we are done. | 5936 // No iterator means we are done. |
5937 if (object_iterator_ == nullptr) return nullptr; | 5937 if (object_iterator_ == nullptr) return nullptr; |
5938 | 5938 |
5939 if (HeapObject* obj = object_iterator_->next_object()) { | 5939 if (HeapObject* obj = object_iterator_->Next()) { |
5940 // If the current iterator has more objects we are fine. | 5940 // If the current iterator has more objects we are fine. |
5941 return obj; | 5941 return obj; |
5942 } else { | 5942 } else { |
5943 // Go though the spaces looking for one that has objects. | 5943 // Go though the spaces looking for one that has objects. |
5944 while (space_iterator_->has_next()) { | 5944 while (space_iterator_->has_next()) { |
5945 object_iterator_ = space_iterator_->next(); | 5945 object_iterator_ = space_iterator_->next(); |
5946 if (HeapObject* obj = object_iterator_->next_object()) { | 5946 if (HeapObject* obj = object_iterator_->Next()) { |
5947 return obj; | 5947 return obj; |
5948 } | 5948 } |
5949 } | 5949 } |
5950 } | 5950 } |
5951 // Done with the last space. | 5951 // Done with the last space. |
5952 object_iterator_ = nullptr; | 5952 object_iterator_ = nullptr; |
5953 return nullptr; | 5953 return nullptr; |
5954 } | 5954 } |
5955 | 5955 |
5956 | 5956 |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6380 } | 6380 } |
6381 | 6381 |
6382 | 6382 |
6383 // static | 6383 // static |
6384 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6384 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6385 return StaticVisitorBase::GetVisitorId(map); | 6385 return StaticVisitorBase::GetVisitorId(map); |
6386 } | 6386 } |
6387 | 6387 |
6388 } // namespace internal | 6388 } // namespace internal |
6389 } // namespace v8 | 6389 } // namespace v8 |
OLD | NEW |