| 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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 | 503 |
| 504 bool CanReload() const; | 504 bool CanReload() const; |
| 505 | 505 |
| 506 void set_last_reload_timestamp(int64_t value) { | 506 void set_last_reload_timestamp(int64_t value) { |
| 507 last_reload_timestamp_ = value; | 507 last_reload_timestamp_ = value; |
| 508 } | 508 } |
| 509 int64_t last_reload_timestamp() const { | 509 int64_t last_reload_timestamp() const { |
| 510 return last_reload_timestamp_; | 510 return last_reload_timestamp_; |
| 511 } | 511 } |
| 512 | 512 |
| 513 bool IsPaused() const; |
| 514 |
| 515 bool should_pause_post_service_request() const { |
| 516 return should_pause_post_service_request_; |
| 517 } |
| 518 void set_should_pause_post_service_request( |
| 519 bool should_pause_post_service_request) { |
| 520 should_pause_post_service_request_ = should_pause_post_service_request; |
| 521 } |
| 522 |
| 523 void PausePostRequest(); |
| 524 |
| 513 uword user_tag() const { | 525 uword user_tag() const { |
| 514 return user_tag_; | 526 return user_tag_; |
| 515 } | 527 } |
| 516 static intptr_t user_tag_offset() { | 528 static intptr_t user_tag_offset() { |
| 517 return OFFSET_OF(Isolate, user_tag_); | 529 return OFFSET_OF(Isolate, user_tag_); |
| 518 } | 530 } |
| 519 static intptr_t current_tag_offset() { | 531 static intptr_t current_tag_offset() { |
| 520 return OFFSET_OF(Isolate, current_tag_); | 532 return OFFSET_OF(Isolate, current_tag_); |
| 521 } | 533 } |
| 522 static intptr_t default_tag_offset() { | 534 static intptr_t default_tag_offset() { |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); | 859 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); |
| 848 #undef ISOLATE_METRIC_VARIABLE | 860 #undef ISOLATE_METRIC_VARIABLE |
| 849 | 861 |
| 850 // Has a reload ever been attempted? | 862 // Has a reload ever been attempted? |
| 851 bool has_attempted_reload_; | 863 bool has_attempted_reload_; |
| 852 intptr_t no_reload_scope_depth_; // we can only reload when this is 0. | 864 intptr_t no_reload_scope_depth_; // we can only reload when this is 0. |
| 853 // Per-isolate copy of FLAG_reload_every. | 865 // Per-isolate copy of FLAG_reload_every. |
| 854 intptr_t reload_every_n_stack_overflow_checks_; | 866 intptr_t reload_every_n_stack_overflow_checks_; |
| 855 IsolateReloadContext* reload_context_; | 867 IsolateReloadContext* reload_context_; |
| 856 int64_t last_reload_timestamp_; | 868 int64_t last_reload_timestamp_; |
| 857 | 869 // Should we pause in the debug message loop after this request? |
| 870 bool should_pause_post_service_request_; |
| 858 | 871 |
| 859 static Dart_IsolateCreateCallback create_callback_; | 872 static Dart_IsolateCreateCallback create_callback_; |
| 860 static Dart_IsolateShutdownCallback shutdown_callback_; | 873 static Dart_IsolateShutdownCallback shutdown_callback_; |
| 861 | 874 |
| 862 static void WakePauseEventHandler(Dart_Isolate isolate); | 875 static void WakePauseEventHandler(Dart_Isolate isolate); |
| 863 | 876 |
| 864 // Manage list of existing isolates. | 877 // Manage list of existing isolates. |
| 865 static bool AddIsolateToList(Isolate* isolate); | 878 static bool AddIsolateToList(Isolate* isolate); |
| 866 static void RemoveIsolateFromList(Isolate* isolate); | 879 static void RemoveIsolateFromList(Isolate* isolate); |
| 867 | 880 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 intptr_t* spawn_count_; | 1024 intptr_t* spawn_count_; |
| 1012 | 1025 |
| 1013 Dart_IsolateFlags isolate_flags_; | 1026 Dart_IsolateFlags isolate_flags_; |
| 1014 bool paused_; | 1027 bool paused_; |
| 1015 bool errors_are_fatal_; | 1028 bool errors_are_fatal_; |
| 1016 }; | 1029 }; |
| 1017 | 1030 |
| 1018 } // namespace dart | 1031 } // namespace dart |
| 1019 | 1032 |
| 1020 #endif // VM_ISOLATE_H_ | 1033 #endif // VM_ISOLATE_H_ |
| OLD | NEW |