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 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 object_store()->libraries()); | 986 object_store()->libraries()); |
987 Library& lib = Library::Handle(current_zone()); | 987 Library& lib = Library::Handle(current_zone()); |
988 intptr_t num_libs = libs.Length(); | 988 intptr_t num_libs = libs.Length(); |
989 for (intptr_t i = 0; i < num_libs; i++) { | 989 for (intptr_t i = 0; i < num_libs; i++) { |
990 lib ^= libs.At(i); | 990 lib ^= libs.At(i); |
991 // If this library was loaded with Dart_LoadLibrary, it was marked | 991 // If this library was loaded with Dart_LoadLibrary, it was marked |
992 // as 'load in progres'. Set the status to 'loaded'. | 992 // as 'load in progres'. Set the status to 'loaded'. |
993 if (lib.LoadInProgress()) { | 993 if (lib.LoadInProgress()) { |
994 lib.SetLoaded(); | 994 lib.SetLoaded(); |
995 } | 995 } |
| 996 lib.InitExportedNamesCache(); |
996 } | 997 } |
997 TokenStream::CloseSharedTokenList(this); | 998 TokenStream::CloseSharedTokenList(this); |
998 } | 999 } |
999 | 1000 |
1000 | 1001 |
1001 bool Isolate::MakeRunnable() { | 1002 bool Isolate::MakeRunnable() { |
1002 ASSERT(Isolate::Current() == NULL); | 1003 ASSERT(Isolate::Current() == NULL); |
1003 | 1004 |
1004 MutexLocker ml(mutex_); | 1005 MutexLocker ml(mutex_); |
1005 // Check if we are in a valid state to make the isolate runnable. | 1006 // Check if we are in a valid state to make the isolate runnable. |
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2692 void IsolateSpawnState::DecrementSpawnCount() { | 2693 void IsolateSpawnState::DecrementSpawnCount() { |
2693 ASSERT(spawn_count_monitor_ != NULL); | 2694 ASSERT(spawn_count_monitor_ != NULL); |
2694 ASSERT(spawn_count_ != NULL); | 2695 ASSERT(spawn_count_ != NULL); |
2695 MonitorLocker ml(spawn_count_monitor_); | 2696 MonitorLocker ml(spawn_count_monitor_); |
2696 ASSERT(*spawn_count_ > 0); | 2697 ASSERT(*spawn_count_ > 0); |
2697 *spawn_count_ = *spawn_count_ - 1; | 2698 *spawn_count_ = *spawn_count_ - 1; |
2698 ml.Notify(); | 2699 ml.Notify(); |
2699 } | 2700 } |
2700 | 2701 |
2701 } // namespace dart | 2702 } // namespace dart |
OLD | NEW |