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_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/class_table.h" | 10 #include "vm/class_table.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 static Dart_IsolateInterruptCallback InterruptCallback(); | 183 static Dart_IsolateInterruptCallback InterruptCallback(); |
184 | 184 |
185 GcPrologueCallbacks& gc_prologue_callbacks() { | 185 GcPrologueCallbacks& gc_prologue_callbacks() { |
186 return gc_prologue_callbacks_; | 186 return gc_prologue_callbacks_; |
187 } | 187 } |
188 | 188 |
189 GcEpilogueCallbacks& gc_epilogue_callbacks() { | 189 GcEpilogueCallbacks& gc_epilogue_callbacks() { |
190 return gc_epilogue_callbacks_; | 190 return gc_epilogue_callbacks_; |
191 } | 191 } |
192 | 192 |
| 193 FILE* flow_graph_file() { |
| 194 return flow_graph_file_; |
| 195 } |
| 196 |
| 197 void set_flow_graph_file(FILE* file) { |
| 198 flow_graph_file_ = file; |
| 199 } |
| 200 |
193 private: | 201 private: |
194 Isolate(); | 202 Isolate(); |
195 | 203 |
196 void BuildName(const char* name_prefix); | 204 void BuildName(const char* name_prefix); |
197 void PrintInvokedFunctions(); | 205 void PrintInvokedFunctions(); |
198 | 206 |
199 static uword GetSpecifiedStackSize(); | 207 static uword GetSpecifiedStackSize(); |
200 | 208 |
201 static const uword kStackSizeBuffer = (128 * KB); | 209 static const uword kStackSizeBuffer = (128 * KB); |
202 static const uword kDefaultStackSize = (1 * MB); | 210 static const uword kDefaultStackSize = (1 * MB); |
(...skipping 19 matching lines...) Expand all Loading... |
222 intptr_t ast_node_id_; // Deprecate. | 230 intptr_t ast_node_id_; // Deprecate. |
223 intptr_t computation_id_; | 231 intptr_t computation_id_; |
224 RawArray* ic_data_array_; | 232 RawArray* ic_data_array_; |
225 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. | 233 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. |
226 uword stack_limit_; | 234 uword stack_limit_; |
227 uword saved_stack_limit_; | 235 uword saved_stack_limit_; |
228 MessageHandler* message_handler_; | 236 MessageHandler* message_handler_; |
229 uword spawn_data_; | 237 uword spawn_data_; |
230 GcPrologueCallbacks gc_prologue_callbacks_; | 238 GcPrologueCallbacks gc_prologue_callbacks_; |
231 GcEpilogueCallbacks gc_epilogue_callbacks_; | 239 GcEpilogueCallbacks gc_epilogue_callbacks_; |
| 240 FILE* flow_graph_file_; |
232 | 241 |
233 static Dart_IsolateCreateCallback create_callback_; | 242 static Dart_IsolateCreateCallback create_callback_; |
234 static Dart_IsolateInterruptCallback interrupt_callback_; | 243 static Dart_IsolateInterruptCallback interrupt_callback_; |
235 | 244 |
236 DISALLOW_COPY_AND_ASSIGN(Isolate); | 245 DISALLOW_COPY_AND_ASSIGN(Isolate); |
237 }; | 246 }; |
238 | 247 |
239 // When we need to execute code in an isolate, we use the | 248 // When we need to execute code in an isolate, we use the |
240 // StartIsolateScope. | 249 // StartIsolateScope. |
241 class StartIsolateScope { | 250 class StartIsolateScope { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 Isolate* new_isolate_; | 305 Isolate* new_isolate_; |
297 Isolate* saved_isolate_; | 306 Isolate* saved_isolate_; |
298 uword saved_stack_limit_; | 307 uword saved_stack_limit_; |
299 | 308 |
300 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); | 309 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); |
301 }; | 310 }; |
302 | 311 |
303 } // namespace dart | 312 } // namespace dart |
304 | 313 |
305 #endif // VM_ISOLATE_H_ | 314 #endif // VM_ISOLATE_H_ |
OLD | NEW |