| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 void PrintHeapMapToJSONStream(Isolate* isolate, JSONStream* stream) { | 246 void PrintHeapMapToJSONStream(Isolate* isolate, JSONStream* stream) { |
| 247 old_space_.PrintHeapMapToJSONStream(isolate, stream); | 247 old_space_.PrintHeapMapToJSONStream(isolate, stream); |
| 248 } | 248 } |
| 249 #endif // PRODUCT | 249 #endif // PRODUCT |
| 250 | 250 |
| 251 Isolate* isolate() const { return isolate_; } | 251 Isolate* isolate() const { return isolate_; } |
| 252 | 252 |
| 253 Monitor* barrier() const { return barrier_; } | 253 Monitor* barrier() const { return barrier_; } |
| 254 Monitor* barrier_done() const { return barrier_done_; } | 254 Monitor* barrier_done() const { return barrier_done_; } |
| 255 | 255 |
| 256 Monitor* finalization_tasks_lock() const { return finalization_tasks_lock_; } | |
| 257 intptr_t finalization_tasks() const { return finalization_tasks_; } | |
| 258 void set_finalization_tasks(intptr_t count) { finalization_tasks_ = count; } | |
| 259 | |
| 260 void SetupExternalPage(void* pointer, uword size, bool is_executable) { | 256 void SetupExternalPage(void* pointer, uword size, bool is_executable) { |
| 261 old_space_.SetupExternalPage(pointer, size, is_executable); | 257 old_space_.SetupExternalPage(pointer, size, is_executable); |
| 262 } | 258 } |
| 263 | 259 |
| 264 private: | 260 private: |
| 265 class GCStats : public ValueObject { | 261 class GCStats : public ValueObject { |
| 266 public: | 262 public: |
| 267 GCStats() {} | 263 GCStats() {} |
| 268 intptr_t num_; | 264 intptr_t num_; |
| 269 Heap::Space space_; | 265 Heap::Space space_; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 // The different spaces used for allocation. | 339 // The different spaces used for allocation. |
| 344 ALIGN8 Scavenger new_space_; | 340 ALIGN8 Scavenger new_space_; |
| 345 PageSpace old_space_; | 341 PageSpace old_space_; |
| 346 | 342 |
| 347 WeakTable* new_weak_tables_[kNumWeakSelectors]; | 343 WeakTable* new_weak_tables_[kNumWeakSelectors]; |
| 348 WeakTable* old_weak_tables_[kNumWeakSelectors]; | 344 WeakTable* old_weak_tables_[kNumWeakSelectors]; |
| 349 | 345 |
| 350 Monitor* barrier_; | 346 Monitor* barrier_; |
| 351 Monitor* barrier_done_; | 347 Monitor* barrier_done_; |
| 352 | 348 |
| 353 Monitor* finalization_tasks_lock_; | |
| 354 intptr_t finalization_tasks_; | |
| 355 | |
| 356 // GC stats collection. | 349 // GC stats collection. |
| 357 GCStats stats_; | 350 GCStats stats_; |
| 358 | 351 |
| 359 // This heap is in read-only mode: No allocation is allowed. | 352 // This heap is in read-only mode: No allocation is allowed. |
| 360 bool read_only_; | 353 bool read_only_; |
| 361 | 354 |
| 362 // GC on the heap is in progress. | 355 // GC on the heap is in progress. |
| 363 Monitor gc_in_progress_monitor_; | 356 Monitor gc_in_progress_monitor_; |
| 364 bool gc_new_space_in_progress_; | 357 bool gc_new_space_in_progress_; |
| 365 bool gc_old_space_in_progress_; | 358 bool gc_old_space_in_progress_; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 // Note: During this scope, the code pages are non-executable. | 391 // Note: During this scope, the code pages are non-executable. |
| 399 class WritableVMIsolateScope : StackResource { | 392 class WritableVMIsolateScope : StackResource { |
| 400 public: | 393 public: |
| 401 explicit WritableVMIsolateScope(Thread* thread); | 394 explicit WritableVMIsolateScope(Thread* thread); |
| 402 ~WritableVMIsolateScope(); | 395 ~WritableVMIsolateScope(); |
| 403 }; | 396 }; |
| 404 | 397 |
| 405 } // namespace dart | 398 } // namespace dart |
| 406 | 399 |
| 407 #endif // VM_HEAP_H_ | 400 #endif // VM_HEAP_H_ |
| OLD | NEW |