Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Side by Side Diff: runtime/vm/isolate.h

Issue 2734323003: Re-landing of "replace TrySync with Metadata". (Closed)
Patch Set: Address review comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 ~NoReloadScope(); 121 ~NoReloadScope();
122 122
123 private: 123 private:
124 Isolate* isolate_; 124 Isolate* isolate_;
125 DISALLOW_COPY_AND_ASSIGN(NoReloadScope); 125 DISALLOW_COPY_AND_ASSIGN(NoReloadScope);
126 }; 126 };
127 127
128 128
129 // Fixed cache for exception handler lookup. 129 // Fixed cache for exception handler lookup.
130 typedef FixedCache<intptr_t, ExceptionHandlerInfo, 16> HandlerInfoCache; 130 typedef FixedCache<intptr_t, ExceptionHandlerInfo, 16> HandlerInfoCache;
131 // Fixed cache for catch entry state lookup.
132 typedef FixedCache<intptr_t, CatchEntryState, 16> CatchEntryStateCache;
131 133
132 // List of Isolate flags with corresponding members of Dart_IsolateFlags and 134 // List of Isolate flags with corresponding members of Dart_IsolateFlags and
133 // corresponding global command line flags. 135 // corresponding global command line flags.
134 // 136 //
135 // V(name, Dart_IsolateFlags-member-name, command-line-flag-name) 137 // V(name, Dart_IsolateFlags-member-name, command-line-flag-name)
136 // 138 //
137 #define ISOLATE_FLAG_LIST(V) \ 139 #define ISOLATE_FLAG_LIST(V) \
138 V(type_checks, enable_type_checks, FLAG_enable_type_checks) \ 140 V(type_checks, enable_type_checks, FLAG_enable_type_checks) \
139 V(asserts, enable_asserts, FLAG_enable_asserts) \ 141 V(asserts, enable_asserts, FLAG_enable_asserts) \
140 V(error_on_bad_type, enable_error_on_bad_type, FLAG_error_on_bad_type) \ 142 V(error_on_bad_type, enable_error_on_bad_type, FLAG_error_on_bad_type) \
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 static bool IsolateCreationEnabled(); 670 static bool IsolateCreationEnabled();
669 671
670 void StopBackgroundCompiler(); 672 void StopBackgroundCompiler();
671 673
672 intptr_t reload_every_n_stack_overflow_checks() const { 674 intptr_t reload_every_n_stack_overflow_checks() const {
673 return reload_every_n_stack_overflow_checks_; 675 return reload_every_n_stack_overflow_checks_;
674 } 676 }
675 677
676 HandlerInfoCache* handler_info_cache() { return &handler_info_cache_; } 678 HandlerInfoCache* handler_info_cache() { return &handler_info_cache_; }
677 679
680 CatchEntryStateCache* catch_entry_state_cache() {
681 return &catch_entry_state_cache_;
682 }
683
678 void MaybeIncreaseReloadEveryNStackOverflowChecks(); 684 void MaybeIncreaseReloadEveryNStackOverflowChecks();
679 685
680 private: 686 private:
681 friend class Dart; // Init, InitOnce, Shutdown. 687 friend class Dart; // Init, InitOnce, Shutdown.
682 friend class IsolateKillerVisitor; // Kill(). 688 friend class IsolateKillerVisitor; // Kill().
683 689
684 explicit Isolate(const Dart_IsolateFlags& api_flags); 690 explicit Isolate(const Dart_IsolateFlags& api_flags);
685 691
686 static void InitOnce(); 692 static void InitOnce();
687 static Isolate* Init(const char* name_prefix, 693 static Isolate* Init(const char* name_prefix,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 bool has_attempted_reload_; 869 bool has_attempted_reload_;
864 intptr_t no_reload_scope_depth_; // we can only reload when this is 0. 870 intptr_t no_reload_scope_depth_; // we can only reload when this is 0.
865 // Per-isolate copy of FLAG_reload_every. 871 // Per-isolate copy of FLAG_reload_every.
866 intptr_t reload_every_n_stack_overflow_checks_; 872 intptr_t reload_every_n_stack_overflow_checks_;
867 IsolateReloadContext* reload_context_; 873 IsolateReloadContext* reload_context_;
868 int64_t last_reload_timestamp_; 874 int64_t last_reload_timestamp_;
869 // Should we pause in the debug message loop after this request? 875 // Should we pause in the debug message loop after this request?
870 bool should_pause_post_service_request_; 876 bool should_pause_post_service_request_;
871 877
872 HandlerInfoCache handler_info_cache_; 878 HandlerInfoCache handler_info_cache_;
879 CatchEntryStateCache catch_entry_state_cache_;
873 880
874 static Dart_IsolateCreateCallback create_callback_; 881 static Dart_IsolateCreateCallback create_callback_;
875 static Dart_IsolateShutdownCallback shutdown_callback_; 882 static Dart_IsolateShutdownCallback shutdown_callback_;
876 static Dart_IsolateCleanupCallback cleanup_callback_; 883 static Dart_IsolateCleanupCallback cleanup_callback_;
877 884
878 static void WakePauseEventHandler(Dart_Isolate isolate); 885 static void WakePauseEventHandler(Dart_Isolate isolate);
879 886
880 // Manage list of existing isolates. 887 // Manage list of existing isolates.
881 static bool AddIsolateToList(Isolate* isolate); 888 static bool AddIsolateToList(Isolate* isolate);
882 static void RemoveIsolateFromList(Isolate* isolate); 889 static void RemoveIsolateFromList(Isolate* isolate);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 intptr_t* spawn_count_; 1035 intptr_t* spawn_count_;
1029 1036
1030 Dart_IsolateFlags isolate_flags_; 1037 Dart_IsolateFlags isolate_flags_;
1031 bool paused_; 1038 bool paused_;
1032 bool errors_are_fatal_; 1039 bool errors_are_fatal_;
1033 }; 1040 };
1034 1041
1035 } // namespace dart 1042 } // namespace dart
1036 1043
1037 #endif // RUNTIME_VM_ISOLATE_H_ 1044 #endif // RUNTIME_VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698