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 #ifndef V8_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 2440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2451 }; | 2451 }; |
2452 | 2452 |
2453 | 2453 |
2454 // Visitor class to verify interior pointers in spaces that do not contain | 2454 // Visitor class to verify interior pointers in spaces that do not contain |
2455 // or care about intergenerational references. All heap object pointers have to | 2455 // or care about intergenerational references. All heap object pointers have to |
2456 // point into the heap to a location that has a map pointer at its first word. | 2456 // point into the heap to a location that has a map pointer at its first word. |
2457 // Caveat: Heap::Contains is an approximation because it can return true for | 2457 // Caveat: Heap::Contains is an approximation because it can return true for |
2458 // objects in a heap space but above the allocation pointer. | 2458 // objects in a heap space but above the allocation pointer. |
2459 class VerifyPointersVisitor : public ObjectVisitor, public RootVisitor { | 2459 class VerifyPointersVisitor : public ObjectVisitor, public RootVisitor { |
2460 public: | 2460 public: |
2461 inline void VisitPointers(Object** start, Object** end) override; | 2461 inline void VisitPointers(HeapObject* host, Object** start, |
| 2462 Object** end) override; |
2462 inline void VisitRootPointers(Root root, Object** start, | 2463 inline void VisitRootPointers(Root root, Object** start, |
2463 Object** end) override; | 2464 Object** end) override; |
2464 | 2465 |
2465 private: | 2466 private: |
2466 inline void VerifyPointers(Object** start, Object** end); | 2467 inline void VerifyPointers(Object** start, Object** end); |
2467 }; | 2468 }; |
2468 | 2469 |
2469 | 2470 |
2470 // Verify that all objects are Smis. | 2471 // Verify that all objects are Smis. |
2471 class VerifySmisVisitor : public RootVisitor { | 2472 class VerifySmisVisitor : public RootVisitor { |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2627 friend class LargeObjectSpace; | 2628 friend class LargeObjectSpace; |
2628 friend class NewSpace; | 2629 friend class NewSpace; |
2629 friend class PagedSpace; | 2630 friend class PagedSpace; |
2630 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2631 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2631 }; | 2632 }; |
2632 | 2633 |
2633 } // namespace internal | 2634 } // namespace internal |
2634 } // namespace v8 | 2635 } // namespace v8 |
2635 | 2636 |
2636 #endif // V8_HEAP_HEAP_H_ | 2637 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |