OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_ISOLATE_H_ | 5 #ifndef VM_ISOLATE_H_ |
6 #define VM_ISOLATE_H_ | 6 #define VM_ISOLATE_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/atomic.h" | 10 #include "vm/atomic.h" |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 return defer_finalization_count_--; | 411 return defer_finalization_count_--; |
412 } | 412 } |
413 | 413 |
414 bool AllowClassFinalization() { | 414 bool AllowClassFinalization() { |
415 ASSERT(defer_finalization_count_ >= 0); | 415 ASSERT(defer_finalization_count_ >= 0); |
416 return defer_finalization_count_ == 0; | 416 return defer_finalization_count_ == 0; |
417 } | 417 } |
418 | 418 |
419 void PrintJSON(JSONStream* stream, bool ref = true); | 419 void PrintJSON(JSONStream* stream, bool ref = true); |
420 | 420 |
421 CompilerStats* compiler_stats() { | 421 // Mutator thread is used to aggregate compiler stats. |
422 return compiler_stats_; | 422 CompilerStats* aggregate_compiler_stats() { |
| 423 ASSERT(HasMutatorThread()); |
| 424 return mutator_thread_->compiler_stats(); |
423 } | 425 } |
424 | 426 |
425 VMTagCounters* vm_tag_counters() { | 427 VMTagCounters* vm_tag_counters() { |
426 return &vm_tag_counters_; | 428 return &vm_tag_counters_; |
427 } | 429 } |
428 | 430 |
429 uword user_tag() const { | 431 uword user_tag() const { |
430 return user_tag_; | 432 return user_tag_; |
431 } | 433 } |
432 static intptr_t user_tag_offset() { | 434 static intptr_t user_tag_offset() { |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 Mutex* type_canonicalization_mutex_; // Protects type canonicalization. | 666 Mutex* type_canonicalization_mutex_; // Protects type canonicalization. |
665 Mutex* constant_canonicalization_mutex_; // Protects const canonicalization. | 667 Mutex* constant_canonicalization_mutex_; // Protects const canonicalization. |
666 MessageHandler* message_handler_; | 668 MessageHandler* message_handler_; |
667 IsolateSpawnState* spawn_state_; | 669 IsolateSpawnState* spawn_state_; |
668 bool is_runnable_; | 670 bool is_runnable_; |
669 Dart_GcPrologueCallback gc_prologue_callback_; | 671 Dart_GcPrologueCallback gc_prologue_callback_; |
670 Dart_GcEpilogueCallback gc_epilogue_callback_; | 672 Dart_GcEpilogueCallback gc_epilogue_callback_; |
671 intptr_t defer_finalization_count_; | 673 intptr_t defer_finalization_count_; |
672 DeoptContext* deopt_context_; | 674 DeoptContext* deopt_context_; |
673 | 675 |
674 CompilerStats* compiler_stats_; | |
675 | |
676 bool is_service_isolate_; | 676 bool is_service_isolate_; |
677 | 677 |
678 // Isolate-specific flags. | 678 // Isolate-specific flags. |
679 NOT_IN_PRODUCT( | 679 NOT_IN_PRODUCT( |
680 bool type_checks_; | 680 bool type_checks_; |
681 bool asserts_; | 681 bool asserts_; |
682 bool error_on_bad_type_; | 682 bool error_on_bad_type_; |
683 bool error_on_bad_override_; | 683 bool error_on_bad_override_; |
684 ) | 684 ) |
685 | 685 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 intptr_t* spawn_count_; | 911 intptr_t* spawn_count_; |
912 | 912 |
913 Dart_IsolateFlags isolate_flags_; | 913 Dart_IsolateFlags isolate_flags_; |
914 bool paused_; | 914 bool paused_; |
915 bool errors_are_fatal_; | 915 bool errors_are_fatal_; |
916 }; | 916 }; |
917 | 917 |
918 } // namespace dart | 918 } // namespace dart |
919 | 919 |
920 #endif // VM_ISOLATE_H_ | 920 #endif // VM_ISOLATE_H_ |
OLD | NEW |