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/json.h" | 10 #include "platform/json.h" |
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 Library& lib = Library::Handle(current_zone()); | 1069 Library& lib = Library::Handle(current_zone()); |
1070 intptr_t num_libs = libs.Length(); | 1070 intptr_t num_libs = libs.Length(); |
1071 for (intptr_t i = 0; i < num_libs; i++) { | 1071 for (intptr_t i = 0; i < num_libs; i++) { |
1072 lib ^= libs.At(i); | 1072 lib ^= libs.At(i); |
1073 // If this library was loaded with Dart_LoadLibrary, it was marked | 1073 // If this library was loaded with Dart_LoadLibrary, it was marked |
1074 // as 'load in progres'. Set the status to 'loaded'. | 1074 // as 'load in progres'. Set the status to 'loaded'. |
1075 if (lib.LoadInProgress()) { | 1075 if (lib.LoadInProgress()) { |
1076 lib.SetLoaded(); | 1076 lib.SetLoaded(); |
1077 } | 1077 } |
1078 } | 1078 } |
| 1079 TokenStream::CloseSharedTokenList(this); |
1079 } | 1080 } |
1080 | 1081 |
1081 | 1082 |
1082 bool Isolate::MakeRunnable() { | 1083 bool Isolate::MakeRunnable() { |
1083 ASSERT(Isolate::Current() == NULL); | 1084 ASSERT(Isolate::Current() == NULL); |
1084 | 1085 |
1085 MutexLocker ml(mutex_); | 1086 MutexLocker ml(mutex_); |
1086 // Check if we are in a valid state to make the isolate runnable. | 1087 // Check if we are in a valid state to make the isolate runnable. |
1087 if (is_runnable() == true) { | 1088 if (is_runnable() == true) { |
1088 return false; // Already runnable. | 1089 return false; // Already runnable. |
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2611 serialized_message_, serialized_message_len_); | 2612 serialized_message_, serialized_message_len_); |
2612 } | 2613 } |
2613 | 2614 |
2614 | 2615 |
2615 void IsolateSpawnState::Cleanup() { | 2616 void IsolateSpawnState::Cleanup() { |
2616 SwitchIsolateScope switch_scope(I); | 2617 SwitchIsolateScope switch_scope(I); |
2617 Dart::ShutdownIsolate(); | 2618 Dart::ShutdownIsolate(); |
2618 } | 2619 } |
2619 | 2620 |
2620 } // namespace dart | 2621 } // namespace dart |
OLD | NEW |