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 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2089 } | 2089 } |
2090 | 2090 |
2091 | 2091 |
2092 void Isolate::set_registered_service_extension_handlers( | 2092 void Isolate::set_registered_service_extension_handlers( |
2093 const GrowableObjectArray& value) { | 2093 const GrowableObjectArray& value) { |
2094 registered_service_extension_handlers_ = value.raw(); | 2094 registered_service_extension_handlers_ = value.raw(); |
2095 } | 2095 } |
2096 | 2096 |
2097 | 2097 |
2098 void Isolate::AddDeoptimizingBoxedField(const Field& field) { | 2098 void Isolate::AddDeoptimizingBoxedField(const Field& field) { |
| 2099 ASSERT(field.IsOriginal()); |
2099 MonitorLocker ml(boxed_field_list_monitor_); | 2100 MonitorLocker ml(boxed_field_list_monitor_); |
2100 if (boxed_field_list_ == GrowableObjectArray::null()) { | 2101 if (boxed_field_list_ == GrowableObjectArray::null()) { |
2101 boxed_field_list_ = GrowableObjectArray::New(Heap::kOld); | 2102 boxed_field_list_ = GrowableObjectArray::New(Heap::kOld); |
2102 } | 2103 } |
2103 const GrowableObjectArray& array = | 2104 const GrowableObjectArray& array = |
2104 GrowableObjectArray::Handle(boxed_field_list_); | 2105 GrowableObjectArray::Handle(boxed_field_list_); |
2105 array.Add(field, Heap::kOld); | 2106 array.Add(field, Heap::kOld); |
2106 } | 2107 } |
2107 | 2108 |
2108 | 2109 |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2824 void IsolateSpawnState::DecrementSpawnCount() { | 2825 void IsolateSpawnState::DecrementSpawnCount() { |
2825 ASSERT(spawn_count_monitor_ != NULL); | 2826 ASSERT(spawn_count_monitor_ != NULL); |
2826 ASSERT(spawn_count_ != NULL); | 2827 ASSERT(spawn_count_ != NULL); |
2827 MonitorLocker ml(spawn_count_monitor_); | 2828 MonitorLocker ml(spawn_count_monitor_); |
2828 ASSERT(*spawn_count_ > 0); | 2829 ASSERT(*spawn_count_ > 0); |
2829 *spawn_count_ = *spawn_count_ - 1; | 2830 *spawn_count_ = *spawn_count_ - 1; |
2830 ml.Notify(); | 2831 ml.Notify(); |
2831 } | 2832 } |
2832 | 2833 |
2833 } // namespace dart | 2834 } // namespace dart |
OLD | NEW |