| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_HEAP_H_ | 5 #ifndef VM_HEAP_H_ |
| 6 #define VM_HEAP_H_ | 6 #define VM_HEAP_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void PromoteExternal(intptr_t size); | 98 void PromoteExternal(intptr_t size); |
| 99 | 99 |
| 100 // Heap contains the specified address. | 100 // Heap contains the specified address. |
| 101 bool Contains(uword addr) const; | 101 bool Contains(uword addr) const; |
| 102 bool NewContains(uword addr) const; | 102 bool NewContains(uword addr) const; |
| 103 bool OldContains(uword addr) const; | 103 bool OldContains(uword addr) const; |
| 104 bool CodeContains(uword addr) const; | 104 bool CodeContains(uword addr) const; |
| 105 bool StubCodeContains(uword addr) const; | 105 bool StubCodeContains(uword addr) const; |
| 106 | 106 |
| 107 // Visit all pointers. | 107 // Visit all pointers. |
| 108 void IteratePointers(ObjectPointerVisitor* visitor) const; | 108 void VisitObjectPointers(ObjectPointerVisitor* visitor) const; |
| 109 | |
| 110 // Visit all pointers in the space. | |
| 111 void IterateNewPointers(ObjectPointerVisitor* visitor) const; | |
| 112 void IterateOldPointers(ObjectPointerVisitor* visitor) const; | |
| 113 | 109 |
| 114 // Visit all objects. | 110 // Visit all objects. |
| 115 void IterateObjects(ObjectVisitor* visitor) const; | 111 void VisitObjects(ObjectVisitor* visitor) const; |
| 116 | |
| 117 // Visit all object in the space. | |
| 118 void IterateNewObjects(ObjectVisitor* visitor) const; | |
| 119 void IterateOldObjects(ObjectVisitor* visitor) const; | |
| 120 | 112 |
| 121 // Find an object by visiting all pointers in the specified heap space, | 113 // Find an object by visiting all pointers in the specified heap space, |
| 122 // the 'visitor' is used to determine if an object is found or not. | 114 // the 'visitor' is used to determine if an object is found or not. |
| 123 // The 'visitor' function should be set up to return true if the | 115 // The 'visitor' function should be set up to return true if the |
| 124 // object is found, traversal through the heap space stops at that | 116 // object is found, traversal through the heap space stops at that |
| 125 // point. | 117 // point. |
| 126 // The 'visitor' function should return false if the object is not found, | 118 // The 'visitor' function should return false if the object is not found, |
| 127 // traversal through the heap space continues. | 119 // traversal through the heap space continues. |
| 128 // Returns null object if nothing is found. Must be called within a | 120 // Returns null object if nothing is found. Must be called within a |
| 129 // NoSafepointScope. | 121 // NoSafepointScope. |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 NoHeapGrowthControlScope(); | 353 NoHeapGrowthControlScope(); |
| 362 ~NoHeapGrowthControlScope(); | 354 ~NoHeapGrowthControlScope(); |
| 363 private: | 355 private: |
| 364 bool current_growth_controller_state_; | 356 bool current_growth_controller_state_; |
| 365 DISALLOW_COPY_AND_ASSIGN(NoHeapGrowthControlScope); | 357 DISALLOW_COPY_AND_ASSIGN(NoHeapGrowthControlScope); |
| 366 }; | 358 }; |
| 367 | 359 |
| 368 } // namespace dart | 360 } // namespace dart |
| 369 | 361 |
| 370 #endif // VM_HEAP_H_ | 362 #endif // VM_HEAP_H_ |
| OLD | NEW |