Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: runtime/vm/isolate.cc

Issue 2823633003: Allow the resolved names cache to be lazily created like the exported names cache. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/clustered_snapshot.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 GrowableObjectArray::Handle(current_zone(), object_store()->libraries()); 1062 GrowableObjectArray::Handle(current_zone(), object_store()->libraries());
1063 Library& lib = Library::Handle(current_zone()); 1063 Library& lib = Library::Handle(current_zone());
1064 intptr_t num_libs = libs.Length(); 1064 intptr_t num_libs = libs.Length();
1065 for (intptr_t i = 0; i < num_libs; i++) { 1065 for (intptr_t i = 0; i < num_libs; i++) {
1066 lib ^= libs.At(i); 1066 lib ^= libs.At(i);
1067 // If this library was loaded with Dart_LoadLibrary, it was marked 1067 // If this library was loaded with Dart_LoadLibrary, it was marked
1068 // as 'load in progres'. Set the status to 'loaded'. 1068 // as 'load in progres'. Set the status to 'loaded'.
1069 if (lib.LoadInProgress()) { 1069 if (lib.LoadInProgress()) {
1070 lib.SetLoaded(); 1070 lib.SetLoaded();
1071 } 1071 }
1072 lib.InitExportedNamesCache();
1073 } 1072 }
1074 TokenStream::CloseSharedTokenList(this); 1073 TokenStream::CloseSharedTokenList(this);
1075 } 1074 }
1076 1075
1077 1076
1078 bool Isolate::CanReload() const { 1077 bool Isolate::CanReload() const {
1079 #ifndef PRODUCT 1078 #ifndef PRODUCT
1080 return !ServiceIsolate::IsServiceIsolateDescendant(this) && is_runnable() && 1079 return !ServiceIsolate::IsServiceIsolateDescendant(this) && is_runnable() &&
1081 !IsReloading() && 1080 !IsReloading() &&
1082 (AtomicOperations::LoadRelaxed(&no_reload_scope_depth_) == 0) && 1081 (AtomicOperations::LoadRelaxed(&no_reload_scope_depth_) == 0) &&
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
2946 void IsolateSpawnState::DecrementSpawnCount() { 2945 void IsolateSpawnState::DecrementSpawnCount() {
2947 ASSERT(spawn_count_monitor_ != NULL); 2946 ASSERT(spawn_count_monitor_ != NULL);
2948 ASSERT(spawn_count_ != NULL); 2947 ASSERT(spawn_count_ != NULL);
2949 MonitorLocker ml(spawn_count_monitor_); 2948 MonitorLocker ml(spawn_count_monitor_);
2950 ASSERT(*spawn_count_ > 0); 2949 ASSERT(*spawn_count_ > 0);
2951 *spawn_count_ = *spawn_count_ - 1; 2950 *spawn_count_ = *spawn_count_ - 1;
2952 ml.Notify(); 2951 ml.Notify();
2953 } 2952 }
2954 2953
2955 } // namespace dart 2954 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/clustered_snapshot.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698