| 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 #include "vm/isolate.h" | 5 #include "vm/isolate.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/json.h" | 10 #include "platform/json.h" |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 #define REUSABLE_HANDLE_SCOPE_INIT(object) | 729 #define REUSABLE_HANDLE_SCOPE_INIT(object) |
| 730 #endif // defined(DEBUG) | 730 #endif // defined(DEBUG) |
| 731 | 731 |
| 732 #define REUSABLE_HANDLE_INITIALIZERS(object) \ | 732 #define REUSABLE_HANDLE_INITIALIZERS(object) \ |
| 733 object##_handle_(NULL), | 733 object##_handle_(NULL), |
| 734 | 734 |
| 735 Isolate::Isolate(const Dart_IsolateFlags& api_flags) | 735 Isolate::Isolate(const Dart_IsolateFlags& api_flags) |
| 736 : stack_limit_(0), | 736 : stack_limit_(0), |
| 737 store_buffer_(new StoreBuffer()), | 737 store_buffer_(new StoreBuffer()), |
| 738 heap_(NULL), | 738 heap_(NULL), |
| 739 vm_tag_(0), | |
| 740 user_tag_(0), | 739 user_tag_(0), |
| 741 current_tag_(UserTag::null()), | 740 current_tag_(UserTag::null()), |
| 742 default_tag_(UserTag::null()), | 741 default_tag_(UserTag::null()), |
| 743 class_table_(), | 742 class_table_(), |
| 744 single_step_(false), | 743 single_step_(false), |
| 745 thread_registry_(new ThreadRegistry()), | 744 thread_registry_(new ThreadRegistry()), |
| 746 message_notify_callback_(NULL), | 745 message_notify_callback_(NULL), |
| 747 name_(NULL), | 746 name_(NULL), |
| 748 debugger_name_(NULL), | 747 debugger_name_(NULL), |
| 749 start_time_(OS::GetCurrentTimeMicros()), | 748 start_time_(OS::GetCurrentTimeMicros()), |
| (...skipping 20 matching lines...) Expand all Loading... |
| 770 stack_base_(0), | 769 stack_base_(0), |
| 771 stack_overflow_flags_(0), | 770 stack_overflow_flags_(0), |
| 772 stack_overflow_count_(0), | 771 stack_overflow_count_(0), |
| 773 message_handler_(NULL), | 772 message_handler_(NULL), |
| 774 spawn_state_(NULL), | 773 spawn_state_(NULL), |
| 775 is_runnable_(false), | 774 is_runnable_(false), |
| 776 gc_prologue_callback_(NULL), | 775 gc_prologue_callback_(NULL), |
| 777 gc_epilogue_callback_(NULL), | 776 gc_epilogue_callback_(NULL), |
| 778 defer_finalization_count_(0), | 777 defer_finalization_count_(0), |
| 779 deopt_context_(NULL), | 778 deopt_context_(NULL), |
| 780 background_compiler_(NULL), | |
| 781 compiler_stats_(NULL), | 779 compiler_stats_(NULL), |
| 782 is_service_isolate_(false), | 780 is_service_isolate_(false), |
| 783 stacktrace_(NULL), | 781 stacktrace_(NULL), |
| 784 stack_frame_index_(-1), | 782 stack_frame_index_(-1), |
| 785 last_allocationprofile_accumulator_reset_timestamp_(0), | 783 last_allocationprofile_accumulator_reset_timestamp_(0), |
| 786 last_allocationprofile_gc_timestamp_(0), | 784 last_allocationprofile_gc_timestamp_(0), |
| 787 object_id_ring_(NULL), | 785 object_id_ring_(NULL), |
| 788 trace_buffer_(NULL), | 786 trace_buffer_(NULL), |
| 789 profiler_data_(NULL), | 787 profiler_data_(NULL), |
| 790 tag_table_(GrowableObjectArray::null()), | 788 tag_table_(GrowableObjectArray::null()), |
| 791 deoptimized_code_array_(GrowableObjectArray::null()), | 789 deoptimized_code_array_(GrowableObjectArray::null()), |
| 790 background_compiler_(NULL), |
| 792 background_compilation_queue_(GrowableObjectArray::null()), | 791 background_compilation_queue_(GrowableObjectArray::null()), |
| 793 pending_service_extension_calls_(GrowableObjectArray::null()), | 792 pending_service_extension_calls_(GrowableObjectArray::null()), |
| 794 registered_service_extension_handlers_(GrowableObjectArray::null()), | 793 registered_service_extension_handlers_(GrowableObjectArray::null()), |
| 795 metrics_list_head_(NULL), | 794 metrics_list_head_(NULL), |
| 796 compilation_allowed_(true), | 795 compilation_allowed_(true), |
| 797 all_classes_finalized_(false), | 796 all_classes_finalized_(false), |
| 798 next_(NULL), | 797 next_(NULL), |
| 799 pause_loop_monitor_(NULL) { | 798 pause_loop_monitor_(NULL) { |
| 800 flags_.CopyFrom(api_flags); | 799 flags_.CopyFrom(api_flags); |
| 801 Thread::Current()->set_vm_tag(VMTag::kEmbedderTagId); | 800 Thread::Current()->set_vm_tag(VMTag::kEmbedderTagId); |
| (...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2603 serialized_message_, serialized_message_len_); | 2602 serialized_message_, serialized_message_len_); |
| 2604 } | 2603 } |
| 2605 | 2604 |
| 2606 | 2605 |
| 2607 void IsolateSpawnState::Cleanup() { | 2606 void IsolateSpawnState::Cleanup() { |
| 2608 SwitchIsolateScope switch_scope(I); | 2607 SwitchIsolateScope switch_scope(I); |
| 2609 Dart::ShutdownIsolate(); | 2608 Dart::ShutdownIsolate(); |
| 2610 } | 2609 } |
| 2611 | 2610 |
| 2612 } // namespace dart | 2611 } // namespace dart |
| OLD | NEW |