| 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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 compilation_allowed_(true), | 832 compilation_allowed_(true), |
| 833 all_classes_finalized_(false), | 833 all_classes_finalized_(false), |
| 834 next_(NULL), | 834 next_(NULL), |
| 835 pause_loop_monitor_(NULL), | 835 pause_loop_monitor_(NULL), |
| 836 loading_invalidation_gen_(kInvalidGen), | 836 loading_invalidation_gen_(kInvalidGen), |
| 837 top_level_parsing_count_(0), | 837 top_level_parsing_count_(0), |
| 838 field_list_mutex_(new Mutex()), | 838 field_list_mutex_(new Mutex()), |
| 839 boxed_field_list_(GrowableObjectArray::null()), | 839 boxed_field_list_(GrowableObjectArray::null()), |
| 840 spawn_count_monitor_(new Monitor()), | 840 spawn_count_monitor_(new Monitor()), |
| 841 spawn_count_(0), | 841 spawn_count_(0), |
| 842 #define ISOLATE_METRIC_CONSTRUCTORS(type, variable, name, unit) \ |
| 843 metric_##variable##_(), |
| 844 ISOLATE_METRIC_LIST(ISOLATE_METRIC_CONSTRUCTORS) |
| 845 #undef ISOLATE_METRIC_CONSTRUCTORS |
| 842 has_attempted_reload_(false), | 846 has_attempted_reload_(false), |
| 843 no_reload_scope_depth_(0), | 847 no_reload_scope_depth_(0), |
| 844 reload_every_n_stack_overflow_checks_(FLAG_reload_every), | 848 reload_every_n_stack_overflow_checks_(FLAG_reload_every), |
| 845 reload_context_(NULL), | 849 reload_context_(NULL), |
| 846 last_reload_timestamp_(OS::GetCurrentTimeMillis()) { | 850 last_reload_timestamp_(OS::GetCurrentTimeMillis()) { |
| 847 NOT_IN_PRODUCT(FlagsCopyFrom(api_flags)); | 851 NOT_IN_PRODUCT(FlagsCopyFrom(api_flags)); |
| 848 // TODO(asiva): A Thread is not available here, need to figure out | 852 // TODO(asiva): A Thread is not available here, need to figure out |
| 849 // how the vm_tag (kEmbedderTagId) can be set, these tags need to | 853 // how the vm_tag (kEmbedderTagId) can be set, these tags need to |
| 850 // move to the OSThread structure. | 854 // move to the OSThread structure. |
| 851 set_user_tag(UserTags::kDefaultUserTag); | 855 set_user_tag(UserTags::kDefaultUserTag); |
| (...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2903 void IsolateSpawnState::DecrementSpawnCount() { | 2907 void IsolateSpawnState::DecrementSpawnCount() { |
| 2904 ASSERT(spawn_count_monitor_ != NULL); | 2908 ASSERT(spawn_count_monitor_ != NULL); |
| 2905 ASSERT(spawn_count_ != NULL); | 2909 ASSERT(spawn_count_ != NULL); |
| 2906 MonitorLocker ml(spawn_count_monitor_); | 2910 MonitorLocker ml(spawn_count_monitor_); |
| 2907 ASSERT(*spawn_count_ > 0); | 2911 ASSERT(*spawn_count_ > 0); |
| 2908 *spawn_count_ = *spawn_count_ - 1; | 2912 *spawn_count_ = *spawn_count_ - 1; |
| 2909 ml.Notify(); | 2913 ml.Notify(); |
| 2910 } | 2914 } |
| 2911 | 2915 |
| 2912 } // namespace dart | 2916 } // namespace dart |
| OLD | NEW |