| 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 2471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2482 }; | 2482 }; |
| 2483 | 2483 |
| 2484 | 2484 |
| 2485 // Visitor class to verify interior pointers in spaces that do not contain | 2485 // Visitor class to verify interior pointers in spaces that do not contain |
| 2486 // or care about intergenerational references. All heap object pointers have to | 2486 // or care about intergenerational references. All heap object pointers have to |
| 2487 // point into the heap to a location that has a map pointer at its first word. | 2487 // point into the heap to a location that has a map pointer at its first word. |
| 2488 // Caveat: Heap::Contains is an approximation because it can return true for | 2488 // Caveat: Heap::Contains is an approximation because it can return true for |
| 2489 // objects in a heap space but above the allocation pointer. | 2489 // objects in a heap space but above the allocation pointer. |
| 2490 class VerifyPointersVisitor : public ObjectVisitor, public RootVisitor { | 2490 class VerifyPointersVisitor : public ObjectVisitor, public RootVisitor { |
| 2491 public: | 2491 public: |
| 2492 inline void VisitPointers(Object** start, Object** end) override; | 2492 inline void VisitPointers(HeapObject* host, Object** start, |
| 2493 Object** end) override; |
| 2493 inline void VisitRootPointers(Root root, Object** start, | 2494 inline void VisitRootPointers(Root root, Object** start, |
| 2494 Object** end) override; | 2495 Object** end) override; |
| 2495 | 2496 |
| 2496 private: | 2497 private: |
| 2497 inline void VerifyPointers(Object** start, Object** end); | 2498 inline void VerifyPointers(Object** start, Object** end); |
| 2498 }; | 2499 }; |
| 2499 | 2500 |
| 2500 | 2501 |
| 2501 // Verify that all objects are Smis. | 2502 // Verify that all objects are Smis. |
| 2502 class VerifySmisVisitor : public RootVisitor { | 2503 class VerifySmisVisitor : public RootVisitor { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2660 friend class PagedSpace; | 2661 friend class PagedSpace; |
| 2661 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2662 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
| 2662 }; | 2663 }; |
| 2663 | 2664 |
| 2664 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space); | 2665 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space); |
| 2665 | 2666 |
| 2666 } // namespace internal | 2667 } // namespace internal |
| 2667 } // namespace v8 | 2668 } // namespace v8 |
| 2668 | 2669 |
| 2669 #endif // V8_HEAP_HEAP_H_ | 2670 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |