| 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 "platform/thread.h" | 10 #include "platform/thread.h" |
| 11 #include "vm/base_isolate.h" | 11 #include "vm/base_isolate.h" |
| 12 #include "vm/class_table.h" | 12 #include "vm/class_table.h" |
| 13 #include "vm/gc_callbacks.h" | |
| 14 #include "vm/handles.h" | 13 #include "vm/handles.h" |
| 15 #include "vm/megamorphic_cache_table.h" | 14 #include "vm/megamorphic_cache_table.h" |
| 16 #include "vm/random.h" | 15 #include "vm/random.h" |
| 17 #include "vm/store_buffer.h" | 16 #include "vm/store_buffer.h" |
| 18 #include "vm/timer.h" | 17 #include "vm/timer.h" |
| 19 | 18 |
| 20 namespace dart { | 19 namespace dart { |
| 21 | 20 |
| 22 // Forward declarations. | 21 // Forward declarations. |
| 23 class AbstractType; | 22 class AbstractType; |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 bool single_step() const { return single_step_; } | 298 bool single_step() const { return single_step_; } |
| 300 static intptr_t single_step_offset() { | 299 static intptr_t single_step_offset() { |
| 301 return OFFSET_OF(Isolate, single_step_); | 300 return OFFSET_OF(Isolate, single_step_); |
| 302 } | 301 } |
| 303 | 302 |
| 304 Random* random() { return &random_; } | 303 Random* random() { return &random_; } |
| 305 | 304 |
| 306 Simulator* simulator() const { return simulator_; } | 305 Simulator* simulator() const { return simulator_; } |
| 307 void set_simulator(Simulator* value) { simulator_ = value; } | 306 void set_simulator(Simulator* value) { simulator_ = value; } |
| 308 | 307 |
| 309 GcPrologueCallbacks& gc_prologue_callbacks() { | 308 Dart_GcPrologueCallback gc_prologue_callback() const { |
| 310 return gc_prologue_callbacks_; | 309 return gc_prologue_callback_; |
| 311 } | 310 } |
| 312 | 311 |
| 313 GcEpilogueCallbacks& gc_epilogue_callbacks() { | 312 void set_gc_prologue_callback(Dart_GcPrologueCallback callback) { |
| 314 return gc_epilogue_callbacks_; | 313 gc_prologue_callback_ = callback; |
| 314 } |
| 315 |
| 316 Dart_GcEpilogueCallback gc_epilogue_callback() const { |
| 317 return gc_epilogue_callback_; |
| 318 } |
| 319 |
| 320 void set_gc_epilogue_callback(Dart_GcEpilogueCallback callback) { |
| 321 gc_epilogue_callback_ = callback; |
| 315 } | 322 } |
| 316 | 323 |
| 317 static void SetCreateCallback(Dart_IsolateCreateCallback cb) { | 324 static void SetCreateCallback(Dart_IsolateCreateCallback cb) { |
| 318 create_callback_ = cb; | 325 create_callback_ = cb; |
| 319 } | 326 } |
| 320 static Dart_IsolateCreateCallback CreateCallback() { | 327 static Dart_IsolateCreateCallback CreateCallback() { |
| 321 return create_callback_; | 328 return create_callback_; |
| 322 } | 329 } |
| 323 | 330 |
| 324 static void SetServiceCreateCallback(Dart_ServiceIsolateCreateCalback cb) { | 331 static void SetServiceCreateCallback(Dart_ServiceIsolateCreateCalback cb) { |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 Simulator* simulator_; | 499 Simulator* simulator_; |
| 493 LongJumpScope* long_jump_base_; | 500 LongJumpScope* long_jump_base_; |
| 494 TimerList timer_list_; | 501 TimerList timer_list_; |
| 495 intptr_t deopt_id_; | 502 intptr_t deopt_id_; |
| 496 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. | 503 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. |
| 497 uword stack_limit_; | 504 uword stack_limit_; |
| 498 uword saved_stack_limit_; | 505 uword saved_stack_limit_; |
| 499 MessageHandler* message_handler_; | 506 MessageHandler* message_handler_; |
| 500 IsolateSpawnState* spawn_state_; | 507 IsolateSpawnState* spawn_state_; |
| 501 bool is_runnable_; | 508 bool is_runnable_; |
| 502 GcPrologueCallbacks gc_prologue_callbacks_; | 509 Dart_GcPrologueCallback gc_prologue_callback_; |
| 503 GcEpilogueCallbacks gc_epilogue_callbacks_; | 510 Dart_GcEpilogueCallback gc_epilogue_callback_; |
| 504 intptr_t defer_finalization_count_; | 511 intptr_t defer_finalization_count_; |
| 505 DeoptContext* deopt_context_; | 512 DeoptContext* deopt_context_; |
| 506 | 513 |
| 507 // Status support. | 514 // Status support. |
| 508 char* stacktrace_; | 515 char* stacktrace_; |
| 509 intptr_t stack_frame_index_; | 516 intptr_t stack_frame_index_; |
| 510 | 517 |
| 511 bool cha_used_; | 518 bool cha_used_; |
| 512 | 519 |
| 513 // Ring buffer of objects assigned an id. | 520 // Ring buffer of objects assigned an id. |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 char* script_url_; | 658 char* script_url_; |
| 652 char* library_url_; | 659 char* library_url_; |
| 653 char* class_name_; | 660 char* class_name_; |
| 654 char* function_name_; | 661 char* function_name_; |
| 655 char* exception_callback_name_; | 662 char* exception_callback_name_; |
| 656 }; | 663 }; |
| 657 | 664 |
| 658 } // namespace dart | 665 } // namespace dart |
| 659 | 666 |
| 660 #endif // VM_ISOLATE_H_ | 667 #endif // VM_ISOLATE_H_ |
| OLD | NEW |