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 "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/json.h" | 9 #include "platform/json.h" |
10 #include "vm/code_observers.h" | 10 #include "vm/code_observers.h" |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 pause_capability_(0), | 635 pause_capability_(0), |
636 terminate_capability_(0), | 636 terminate_capability_(0), |
637 errors_fatal_(true), | 637 errors_fatal_(true), |
638 heap_(NULL), | 638 heap_(NULL), |
639 object_store_(NULL), | 639 object_store_(NULL), |
640 top_exit_frame_info_(0), | 640 top_exit_frame_info_(0), |
641 init_callback_data_(NULL), | 641 init_callback_data_(NULL), |
642 environment_callback_(NULL), | 642 environment_callback_(NULL), |
643 library_tag_handler_(NULL), | 643 library_tag_handler_(NULL), |
644 api_state_(NULL), | 644 api_state_(NULL), |
645 stub_code_(NULL), | |
646 debugger_(NULL), | 645 debugger_(NULL), |
647 single_step_(false), | 646 single_step_(false), |
648 resume_request_(false), | 647 resume_request_(false), |
649 has_compiled_(false), | 648 has_compiled_(false), |
650 flags_(), | 649 flags_(), |
651 random_(), | 650 random_(), |
652 simulator_(NULL), | 651 simulator_(NULL), |
653 long_jump_base_(NULL), | 652 long_jump_base_(NULL), |
654 timer_list_(), | 653 timer_list_(), |
655 deopt_id_(0), | 654 deopt_id_(0), |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 #undef REUSABLE_HANDLE_SCOPE_INIT | 697 #undef REUSABLE_HANDLE_SCOPE_INIT |
699 #undef REUSABLE_HANDLE_INITIALIZERS | 698 #undef REUSABLE_HANDLE_INITIALIZERS |
700 | 699 |
701 Isolate::~Isolate() { | 700 Isolate::~Isolate() { |
702 free(name_); | 701 free(name_); |
703 free(debugger_name_); | 702 free(debugger_name_); |
704 delete store_buffer_; | 703 delete store_buffer_; |
705 delete heap_; | 704 delete heap_; |
706 delete object_store_; | 705 delete object_store_; |
707 delete api_state_; | 706 delete api_state_; |
708 delete stub_code_; | |
709 delete debugger_; | 707 delete debugger_; |
710 #if defined(USING_SIMULATOR) | 708 #if defined(USING_SIMULATOR) |
711 delete simulator_; | 709 delete simulator_; |
712 #endif | 710 #endif |
713 delete mutex_; | 711 delete mutex_; |
714 mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate. | 712 mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate. |
715 delete message_handler_; | 713 delete message_handler_; |
716 message_handler_ = NULL; // Fail fast if we send messages to a dead isolate. | 714 message_handler_ = NULL; // Fail fast if we send messages to a dead isolate. |
717 ASSERT(deopt_context_ == NULL); // No deopt in progress when isolate deleted. | 715 ASSERT(deopt_context_ == NULL); // No deopt in progress when isolate deleted. |
718 delete spawn_state_; | 716 delete spawn_state_; |
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2117 serialized_message_, serialized_message_len_); | 2115 serialized_message_, serialized_message_len_); |
2118 } | 2116 } |
2119 | 2117 |
2120 | 2118 |
2121 void IsolateSpawnState::Cleanup() { | 2119 void IsolateSpawnState::Cleanup() { |
2122 SwitchIsolateScope switch_scope(I); | 2120 SwitchIsolateScope switch_scope(I); |
2123 Dart::ShutdownIsolate(); | 2121 Dart::ShutdownIsolate(); |
2124 } | 2122 } |
2125 | 2123 |
2126 } // namespace dart | 2124 } // namespace dart |
OLD | NEW |