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 RUNTIME_VM_ISOLATE_H_ | 5 #ifndef RUNTIME_VM_ISOLATE_H_ |
6 #define RUNTIME_VM_ISOLATE_H_ | 6 #define RUNTIME_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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 Mutex* mutex() const { return mutex_; } | 312 Mutex* mutex() const { return mutex_; } |
313 Mutex* symbols_mutex() const { return symbols_mutex_; } | 313 Mutex* symbols_mutex() const { return symbols_mutex_; } |
314 Mutex* type_canonicalization_mutex() const { | 314 Mutex* type_canonicalization_mutex() const { |
315 return type_canonicalization_mutex_; | 315 return type_canonicalization_mutex_; |
316 } | 316 } |
317 Mutex* constant_canonicalization_mutex() const { | 317 Mutex* constant_canonicalization_mutex() const { |
318 return constant_canonicalization_mutex_; | 318 return constant_canonicalization_mutex_; |
319 } | 319 } |
320 Mutex* megamorphic_lookup_mutex() const { return megamorphic_lookup_mutex_; } | 320 Mutex* megamorphic_lookup_mutex() const { return megamorphic_lookup_mutex_; } |
321 | 321 |
| 322 #if !defined(PRODUCT) |
322 Debugger* debugger() const { | 323 Debugger* debugger() const { |
323 if (!FLAG_support_debugger) { | 324 if (!FLAG_support_debugger) { |
324 return NULL; | 325 return NULL; |
325 } | 326 } |
326 ASSERT(debugger_ != NULL); | 327 ASSERT(debugger_ != NULL); |
327 return debugger_; | 328 return debugger_; |
328 } | 329 } |
| 330 #endif |
329 | 331 |
330 void set_single_step(bool value) { single_step_ = value; } | 332 void set_single_step(bool value) { single_step_ = value; } |
331 bool single_step() const { return single_step_; } | 333 bool single_step() const { return single_step_; } |
332 static intptr_t single_step_offset() { | 334 static intptr_t single_step_offset() { |
333 return OFFSET_OF(Isolate, single_step_); | 335 return OFFSET_OF(Isolate, single_step_); |
334 } | 336 } |
335 | 337 |
336 // Lets the embedder know that a service message resulted in a resume request. | 338 // Lets the embedder know that a service message resulted in a resume request. |
337 void SetResumeRequest() { | 339 void SetResumeRequest() { |
338 resume_request_ = true; | 340 resume_request_ = true; |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 int64_t start_time_micros_; | 761 int64_t start_time_micros_; |
760 Dart_Port main_port_; | 762 Dart_Port main_port_; |
761 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. | 763 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. |
762 uint64_t pause_capability_; | 764 uint64_t pause_capability_; |
763 uint64_t terminate_capability_; | 765 uint64_t terminate_capability_; |
764 bool errors_fatal_; | 766 bool errors_fatal_; |
765 void* init_callback_data_; | 767 void* init_callback_data_; |
766 Dart_EnvironmentCallback environment_callback_; | 768 Dart_EnvironmentCallback environment_callback_; |
767 Dart_LibraryTagHandler library_tag_handler_; | 769 Dart_LibraryTagHandler library_tag_handler_; |
768 ApiState* api_state_; | 770 ApiState* api_state_; |
769 Debugger* debugger_; | 771 NOT_IN_PRODUCT(Debugger* debugger_); |
770 bool resume_request_; | 772 bool resume_request_; |
771 int64_t last_resume_timestamp_; | 773 int64_t last_resume_timestamp_; |
772 Random random_; | 774 Random random_; |
773 Simulator* simulator_; | 775 Simulator* simulator_; |
774 Mutex* mutex_; // Protects compiler stats. | 776 Mutex* mutex_; // Protects compiler stats. |
775 Mutex* symbols_mutex_; // Protects concurrent access to the symbol table. | 777 Mutex* symbols_mutex_; // Protects concurrent access to the symbol table. |
776 Mutex* type_canonicalization_mutex_; // Protects type canonicalization. | 778 Mutex* type_canonicalization_mutex_; // Protects type canonicalization. |
777 Mutex* constant_canonicalization_mutex_; // Protects const canonicalization. | 779 Mutex* constant_canonicalization_mutex_; // Protects const canonicalization. |
778 Mutex* megamorphic_lookup_mutex_; // Protects megamorphic table lookup. | 780 Mutex* megamorphic_lookup_mutex_; // Protects megamorphic table lookup. |
779 MessageHandler* message_handler_; | 781 MessageHandler* message_handler_; |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 intptr_t* spawn_count_; | 1034 intptr_t* spawn_count_; |
1033 | 1035 |
1034 Dart_IsolateFlags isolate_flags_; | 1036 Dart_IsolateFlags isolate_flags_; |
1035 bool paused_; | 1037 bool paused_; |
1036 bool errors_are_fatal_; | 1038 bool errors_are_fatal_; |
1037 }; | 1039 }; |
1038 | 1040 |
1039 } // namespace dart | 1041 } // namespace dart |
1040 | 1042 |
1041 #endif // RUNTIME_VM_ISOLATE_H_ | 1043 #endif // RUNTIME_VM_ISOLATE_H_ |
OLD | NEW |