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

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

Issue 1908123002: Fix export cache invalidation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 9744 matching lines...) Expand 10 before | Expand all | Expand 10 after
9755 } 9755 }
9756 // When a new name is added to a library, we need to invalidate all 9756 // When a new name is added to a library, we need to invalidate all
9757 // caches that contain an entry for this name. If the name was previously 9757 // caches that contain an entry for this name. If the name was previously
9758 // looked up but could not be resolved, the cache contains a null entry. 9758 // looked up but could not be resolved, the cache contains a null entry.
9759 GrowableObjectArray& libs = GrowableObjectArray::Handle( 9759 GrowableObjectArray& libs = GrowableObjectArray::Handle(
9760 zone, thread->isolate()->object_store()->libraries()); 9760 zone, thread->isolate()->object_store()->libraries());
9761 Library& lib = Library::Handle(zone); 9761 Library& lib = Library::Handle(zone);
9762 intptr_t num_libs = libs.Length(); 9762 intptr_t num_libs = libs.Length();
9763 for (intptr_t i = 0; i < num_libs; i++) { 9763 for (intptr_t i = 0; i < num_libs; i++) {
9764 lib ^= libs.At(i); 9764 lib ^= libs.At(i);
9765 if (LookupExportedNamesCache(name, &entry)) { 9765 if (lib.LookupExportedNamesCache(name, &entry)) {
9766 InitExportedNamesCache(); 9766 lib.InitExportedNamesCache();
9767 } 9767 }
9768 } 9768 }
9769 } 9769 }
9770 9770
9771 9771
9772 void Library::InvalidateResolvedNamesCache() const { 9772 void Library::InvalidateResolvedNamesCache() const {
9773 const intptr_t kInvalidatedCacheSize = 16; 9773 const intptr_t kInvalidatedCacheSize = 16;
9774 InitResolvedNamesCache(kInvalidatedCacheSize); 9774 InitResolvedNamesCache(kInvalidatedCacheSize);
9775 } 9775 }
9776 9776
(...skipping 12505 matching lines...) Expand 10 before | Expand all | Expand 10 after
22282 return UserTag::null(); 22282 return UserTag::null();
22283 } 22283 }
22284 22284
22285 22285
22286 const char* UserTag::ToCString() const { 22286 const char* UserTag::ToCString() const {
22287 const String& tag_label = String::Handle(label()); 22287 const String& tag_label = String::Handle(label());
22288 return tag_label.ToCString(); 22288 return tag_label.ToCString();
22289 } 22289 }
22290 22290
22291 } // namespace dart 22291 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698