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 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1396 | 1396 |
1397 void Isolate::Run() { | 1397 void Isolate::Run() { |
1398 message_handler()->Run(Dart::thread_pool(), | 1398 message_handler()->Run(Dart::thread_pool(), |
1399 RunIsolate, | 1399 RunIsolate, |
1400 ShutdownIsolate, | 1400 ShutdownIsolate, |
1401 reinterpret_cast<uword>(this)); | 1401 reinterpret_cast<uword>(this)); |
1402 } | 1402 } |
1403 | 1403 |
1404 | 1404 |
1405 void Isolate::AddClosureFunction(const Function& function) const { | 1405 void Isolate::AddClosureFunction(const Function& function) const { |
1406 // TODO(regis): remove once debugging complete. | |
1407 if (Compiler::IsBackgroundCompilation()) { | |
1408 NOT_IN_PRODUCT(Profiler::DumpStackTrace(true /*native*/)); | |
1409 UNREACHABLE(); | |
1410 } | |
1411 ASSERT(!Compiler::IsBackgroundCompilation()); | 1406 ASSERT(!Compiler::IsBackgroundCompilation()); |
1412 GrowableObjectArray& closures = | 1407 GrowableObjectArray& closures = |
1413 GrowableObjectArray::Handle(object_store()->closure_functions()); | 1408 GrowableObjectArray::Handle(object_store()->closure_functions()); |
1414 ASSERT(!closures.IsNull()); | 1409 ASSERT(!closures.IsNull()); |
1415 ASSERT(function.IsNonImplicitClosureFunction()); | 1410 ASSERT(function.IsNonImplicitClosureFunction()); |
1416 closures.Add(function, Heap::kOld); | 1411 closures.Add(function, Heap::kOld); |
1417 } | 1412 } |
1418 | 1413 |
1419 | 1414 |
1420 // If the linear lookup turns out to be too expensive, the list | 1415 // If the linear lookup turns out to be too expensive, the list |
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2716 void IsolateSpawnState::DecrementSpawnCount() { | 2711 void IsolateSpawnState::DecrementSpawnCount() { |
2717 ASSERT(spawn_count_monitor_ != NULL); | 2712 ASSERT(spawn_count_monitor_ != NULL); |
2718 ASSERT(spawn_count_ != NULL); | 2713 ASSERT(spawn_count_ != NULL); |
2719 MonitorLocker ml(spawn_count_monitor_); | 2714 MonitorLocker ml(spawn_count_monitor_); |
2720 ASSERT(*spawn_count_ > 0); | 2715 ASSERT(*spawn_count_ > 0); |
2721 *spawn_count_ = *spawn_count_ - 1; | 2716 *spawn_count_ = *spawn_count_ - 1; |
2722 ml.Notify(); | 2717 ml.Notify(); |
2723 } | 2718 } |
2724 | 2719 |
2725 } // namespace dart | 2720 } // namespace dart |
OLD | NEW |