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_SCAVENGER_H_ | 5 #ifndef VM_SCAVENGER_H_ |
6 #define VM_SCAVENGER_H_ | 6 #define VM_SCAVENGER_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/utils.h" | 9 #include "platform/utils.h" |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 } | 197 } |
198 | 198 |
199 void IncrementCollections() { | 199 void IncrementCollections() { |
200 collections_++; | 200 collections_++; |
201 } | 201 } |
202 | 202 |
203 intptr_t collections() const { | 203 intptr_t collections() const { |
204 return collections_; | 204 return collections_; |
205 } | 205 } |
206 | 206 |
| 207 #ifndef PRODUCT |
207 void PrintToJSONObject(JSONObject* object) const; | 208 void PrintToJSONObject(JSONObject* object) const; |
| 209 #endif // !PRODUCT |
208 | 210 |
209 void AllocateExternal(intptr_t size); | 211 void AllocateExternal(intptr_t size); |
210 void FreeExternal(intptr_t size); | 212 void FreeExternal(intptr_t size); |
211 | 213 |
212 private: | 214 private: |
213 // Ids for time and data records in Heap::GCStats. | 215 // Ids for time and data records in Heap::GCStats. |
214 enum { | 216 enum { |
215 // Time | 217 // Time |
216 kVisitIsolateRoots = 0, | 218 kVisitIsolateRoots = 0, |
217 kIterateStoreBuffers = 1, | 219 kIterateStoreBuffers = 1, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 308 |
307 friend class ScavengerVisitor; | 309 friend class ScavengerVisitor; |
308 friend class ScavengerWeakVisitor; | 310 friend class ScavengerWeakVisitor; |
309 | 311 |
310 DISALLOW_COPY_AND_ASSIGN(Scavenger); | 312 DISALLOW_COPY_AND_ASSIGN(Scavenger); |
311 }; | 313 }; |
312 | 314 |
313 } // namespace dart | 315 } // namespace dart |
314 | 316 |
315 #endif // VM_SCAVENGER_H_ | 317 #endif // VM_SCAVENGER_H_ |
OLD | NEW |