| 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 RUNTIME_VM_SCAVENGER_H_ | 5 #ifndef RUNTIME_VM_SCAVENGER_H_ |
| 6 #define RUNTIME_VM_SCAVENGER_H_ | 6 #define RUNTIME_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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 return end_ < to_->end(); | 247 return end_ < to_->end(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 void UpdateMaxHeapCapacity(); | 250 void UpdateMaxHeapCapacity(); |
| 251 void UpdateMaxHeapUsage(); | 251 void UpdateMaxHeapUsage(); |
| 252 | 252 |
| 253 void ProcessWeakReferences(); | 253 void ProcessWeakReferences(); |
| 254 | 254 |
| 255 intptr_t NewSizeInWords(intptr_t old_size_in_words) const; | 255 intptr_t NewSizeInWords(intptr_t old_size_in_words) const; |
| 256 | 256 |
| 257 // Current allocation top and end. These values are being accessed directly | 257 // Accessed from generated code. |
| 258 // from generated code. | 258 // ** This block of fields must come first! ** |
| 259 // For AOT cross-compilation, we rely on these members having the same offsets |
| 260 // in SIMARM(IA32) and ARM, and the same offsets in SIMARM64(X64) and ARM64. |
| 261 // We use only word-sized fields to avoid differences in struct packing on the |
| 262 // different architectures. See also CheckOffsets in dart.cc. |
| 259 uword top_; | 263 uword top_; |
| 260 uword end_; | 264 uword end_; |
| 261 | 265 |
| 262 SemiSpace* to_; | 266 SemiSpace* to_; |
| 263 | 267 |
| 264 Heap* heap_; | 268 Heap* heap_; |
| 265 | 269 |
| 266 // A pointer to the first unscanned object. Scanning completes when | 270 // A pointer to the first unscanned object. Scanning completes when |
| 267 // this value meets the allocation top. | 271 // this value meets the allocation top. |
| 268 uword resolved_top_; | 272 uword resolved_top_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 291 | 295 |
| 292 friend class ScavengerVisitor; | 296 friend class ScavengerVisitor; |
| 293 friend class ScavengerWeakVisitor; | 297 friend class ScavengerWeakVisitor; |
| 294 | 298 |
| 295 DISALLOW_COPY_AND_ASSIGN(Scavenger); | 299 DISALLOW_COPY_AND_ASSIGN(Scavenger); |
| 296 }; | 300 }; |
| 297 | 301 |
| 298 } // namespace dart | 302 } // namespace dart |
| 299 | 303 |
| 300 #endif // RUNTIME_VM_SCAVENGER_H_ | 304 #endif // RUNTIME_VM_SCAVENGER_H_ |
| OLD | NEW |