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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 symbols_mutex_(new Mutex()), | 806 symbols_mutex_(new Mutex()), |
807 type_canonicalization_mutex_(new Mutex()), | 807 type_canonicalization_mutex_(new Mutex()), |
808 constant_canonicalization_mutex_(new Mutex()), | 808 constant_canonicalization_mutex_(new Mutex()), |
809 megamorphic_lookup_mutex_(new Mutex()), | 809 megamorphic_lookup_mutex_(new Mutex()), |
810 message_handler_(NULL), | 810 message_handler_(NULL), |
811 spawn_state_(NULL), | 811 spawn_state_(NULL), |
812 is_runnable_(false), | 812 is_runnable_(false), |
813 gc_prologue_callback_(NULL), | 813 gc_prologue_callback_(NULL), |
814 gc_epilogue_callback_(NULL), | 814 gc_epilogue_callback_(NULL), |
815 defer_finalization_count_(0), | 815 defer_finalization_count_(0), |
| 816 pending_deopts_(new MallocGrowableArray<PendingLazyDeopt>), |
816 deopt_context_(NULL), | 817 deopt_context_(NULL), |
817 is_service_isolate_(false), | 818 is_service_isolate_(false), |
818 stacktrace_(NULL), | 819 stacktrace_(NULL), |
819 stack_frame_index_(-1), | 820 stack_frame_index_(-1), |
820 last_allocationprofile_accumulator_reset_timestamp_(0), | 821 last_allocationprofile_accumulator_reset_timestamp_(0), |
821 last_allocationprofile_gc_timestamp_(0), | 822 last_allocationprofile_gc_timestamp_(0), |
822 object_id_ring_(NULL), | 823 object_id_ring_(NULL), |
823 tag_table_(GrowableObjectArray::null()), | 824 tag_table_(GrowableObjectArray::null()), |
824 deoptimized_code_array_(GrowableObjectArray::null()), | 825 deoptimized_code_array_(GrowableObjectArray::null()), |
825 sticky_error_(Error::null()), | 826 sticky_error_(Error::null()), |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 delete mutex_; | 872 delete mutex_; |
872 mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate. | 873 mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate. |
873 delete symbols_mutex_; | 874 delete symbols_mutex_; |
874 symbols_mutex_ = NULL; | 875 symbols_mutex_ = NULL; |
875 delete type_canonicalization_mutex_; | 876 delete type_canonicalization_mutex_; |
876 type_canonicalization_mutex_ = NULL; | 877 type_canonicalization_mutex_ = NULL; |
877 delete constant_canonicalization_mutex_; | 878 delete constant_canonicalization_mutex_; |
878 constant_canonicalization_mutex_ = NULL; | 879 constant_canonicalization_mutex_ = NULL; |
879 delete megamorphic_lookup_mutex_; | 880 delete megamorphic_lookup_mutex_; |
880 megamorphic_lookup_mutex_ = NULL; | 881 megamorphic_lookup_mutex_ = NULL; |
| 882 delete pending_deopts_; |
| 883 pending_deopts_ = NULL; |
881 delete message_handler_; | 884 delete message_handler_; |
882 message_handler_ = NULL; // Fail fast if we send messages to a dead isolate. | 885 message_handler_ = NULL; // Fail fast if we send messages to a dead isolate. |
883 ASSERT(deopt_context_ == NULL); // No deopt in progress when isolate deleted. | 886 ASSERT(deopt_context_ == NULL); // No deopt in progress when isolate deleted. |
884 delete spawn_state_; | 887 delete spawn_state_; |
885 #ifndef PRODUCT | 888 #ifndef PRODUCT |
886 if (FLAG_support_service) { | 889 if (FLAG_support_service) { |
887 delete object_id_ring_; | 890 delete object_id_ring_; |
888 } | 891 } |
889 #endif // !PRODUCT | 892 #endif // !PRODUCT |
890 object_id_ring_ = NULL; | 893 object_id_ring_ = NULL; |
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2900 void IsolateSpawnState::DecrementSpawnCount() { | 2903 void IsolateSpawnState::DecrementSpawnCount() { |
2901 ASSERT(spawn_count_monitor_ != NULL); | 2904 ASSERT(spawn_count_monitor_ != NULL); |
2902 ASSERT(spawn_count_ != NULL); | 2905 ASSERT(spawn_count_ != NULL); |
2903 MonitorLocker ml(spawn_count_monitor_); | 2906 MonitorLocker ml(spawn_count_monitor_); |
2904 ASSERT(*spawn_count_ > 0); | 2907 ASSERT(*spawn_count_ > 0); |
2905 *spawn_count_ = *spawn_count_ - 1; | 2908 *spawn_count_ = *spawn_count_ - 1; |
2906 ml.Notify(); | 2909 ml.Notify(); |
2907 } | 2910 } |
2908 | 2911 |
2909 } // namespace dart | 2912 } // namespace dart |
OLD | NEW |