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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 case kCode: | 71 case kCode: |
72 return code_space_->TryAllocate(size); | 72 return code_space_->TryAllocate(size); |
73 default: | 73 default: |
74 UNREACHABLE(); | 74 UNREACHABLE(); |
75 } | 75 } |
76 return 0; | 76 return 0; |
77 } | 77 } |
78 | 78 |
79 // Heap contains the specified address. | 79 // Heap contains the specified address. |
80 bool Contains(uword addr) const; | 80 bool Contains(uword addr) const; |
| 81 bool NewContains(uword addr) const; |
| 82 bool OldContains(uword addr) const; |
81 bool CodeContains(uword addr) const; | 83 bool CodeContains(uword addr) const; |
82 bool StubCodeContains(uword addr) const; | 84 bool StubCodeContains(uword addr) const; |
83 | 85 |
84 // Visit all pointers. | 86 // Visit all pointers. |
85 void IteratePointers(ObjectPointerVisitor* visitor); | 87 void IteratePointers(ObjectPointerVisitor* visitor); |
86 | 88 |
87 // Visit all pointers in the space. | 89 // Visit all pointers in the space. |
88 void IterateNewPointers(ObjectPointerVisitor* visitor); | 90 void IterateNewPointers(ObjectPointerVisitor* visitor); |
89 void IterateOldPointers(ObjectPointerVisitor* visitor); | 91 void IterateOldPointers(ObjectPointerVisitor* visitor); |
90 void IterateCodePointers(ObjectPointerVisitor* visitor); | 92 void IterateCodePointers(ObjectPointerVisitor* visitor); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 public: | 169 public: |
168 NoGCScope() {} | 170 NoGCScope() {} |
169 private: | 171 private: |
170 DISALLOW_COPY_AND_ASSIGN(NoGCScope); | 172 DISALLOW_COPY_AND_ASSIGN(NoGCScope); |
171 }; | 173 }; |
172 #endif // defined(DEBUG) | 174 #endif // defined(DEBUG) |
173 | 175 |
174 } // namespace dart | 176 } // namespace dart |
175 | 177 |
176 #endif // VM_HEAP_H_ | 178 #endif // VM_HEAP_H_ |
OLD | NEW |