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/text_buffer.h" | 10 #include "platform/text_buffer.h" |
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 debugger_(NULL), | 790 debugger_(NULL), |
791 resume_request_(false), | 791 resume_request_(false), |
792 last_resume_timestamp_(OS::GetCurrentTimeMillis()), | 792 last_resume_timestamp_(OS::GetCurrentTimeMillis()), |
793 has_compiled_code_(false), | 793 has_compiled_code_(false), |
794 random_(), | 794 random_(), |
795 simulator_(NULL), | 795 simulator_(NULL), |
796 mutex_(new Mutex()), | 796 mutex_(new Mutex()), |
797 symbols_mutex_(new Mutex()), | 797 symbols_mutex_(new Mutex()), |
798 type_canonicalization_mutex_(new Mutex()), | 798 type_canonicalization_mutex_(new Mutex()), |
799 constant_canonicalization_mutex_(new Mutex()), | 799 constant_canonicalization_mutex_(new Mutex()), |
| 800 megamorphic_lookup_mutex_(new Mutex()), |
800 message_handler_(NULL), | 801 message_handler_(NULL), |
801 spawn_state_(NULL), | 802 spawn_state_(NULL), |
802 is_runnable_(false), | 803 is_runnable_(false), |
803 gc_prologue_callback_(NULL), | 804 gc_prologue_callback_(NULL), |
804 gc_epilogue_callback_(NULL), | 805 gc_epilogue_callback_(NULL), |
805 defer_finalization_count_(0), | 806 defer_finalization_count_(0), |
806 deopt_context_(NULL), | 807 deopt_context_(NULL), |
807 is_service_isolate_(false), | 808 is_service_isolate_(false), |
808 stacktrace_(NULL), | 809 stacktrace_(NULL), |
809 stack_frame_index_(-1), | 810 stack_frame_index_(-1), |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 delete simulator_; | 857 delete simulator_; |
857 #endif | 858 #endif |
858 delete mutex_; | 859 delete mutex_; |
859 mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate. | 860 mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate. |
860 delete symbols_mutex_; | 861 delete symbols_mutex_; |
861 symbols_mutex_ = NULL; | 862 symbols_mutex_ = NULL; |
862 delete type_canonicalization_mutex_; | 863 delete type_canonicalization_mutex_; |
863 type_canonicalization_mutex_ = NULL; | 864 type_canonicalization_mutex_ = NULL; |
864 delete constant_canonicalization_mutex_; | 865 delete constant_canonicalization_mutex_; |
865 constant_canonicalization_mutex_ = NULL; | 866 constant_canonicalization_mutex_ = NULL; |
| 867 delete megamorphic_lookup_mutex_; |
| 868 megamorphic_lookup_mutex_ = NULL; |
866 delete message_handler_; | 869 delete message_handler_; |
867 message_handler_ = NULL; // Fail fast if we send messages to a dead isolate. | 870 message_handler_ = NULL; // Fail fast if we send messages to a dead isolate. |
868 ASSERT(deopt_context_ == NULL); // No deopt in progress when isolate deleted. | 871 ASSERT(deopt_context_ == NULL); // No deopt in progress when isolate deleted. |
869 delete spawn_state_; | 872 delete spawn_state_; |
870 if (FLAG_support_service) { | 873 if (FLAG_support_service) { |
871 delete object_id_ring_; | 874 delete object_id_ring_; |
872 } | 875 } |
873 object_id_ring_ = NULL; | 876 object_id_ring_ = NULL; |
874 delete pause_loop_monitor_; | 877 delete pause_loop_monitor_; |
875 pause_loop_monitor_ = NULL; | 878 pause_loop_monitor_ = NULL; |
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2816 void IsolateSpawnState::DecrementSpawnCount() { | 2819 void IsolateSpawnState::DecrementSpawnCount() { |
2817 ASSERT(spawn_count_monitor_ != NULL); | 2820 ASSERT(spawn_count_monitor_ != NULL); |
2818 ASSERT(spawn_count_ != NULL); | 2821 ASSERT(spawn_count_ != NULL); |
2819 MonitorLocker ml(spawn_count_monitor_); | 2822 MonitorLocker ml(spawn_count_monitor_); |
2820 ASSERT(*spawn_count_ > 0); | 2823 ASSERT(*spawn_count_ > 0); |
2821 *spawn_count_ = *spawn_count_ - 1; | 2824 *spawn_count_ = *spawn_count_ - 1; |
2822 ml.Notify(); | 2825 ml.Notify(); |
2823 } | 2826 } |
2824 | 2827 |
2825 } // namespace dart | 2828 } // namespace dart |
OLD | NEW |