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

Unified Diff: runtime/vm/raw_object_snapshot.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object_snapshot.cc
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 7e823b75b222279306eb1d79772ede372273a827..186b18981a317e1be833423ce77546d99baccf0d 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -1155,14 +1155,11 @@ RawLibrary* Library::ReadFrom(SnapshotReader* reader,
library.StorePointer((library.raw()->from() + i),
reader->PassiveObjectHandle()->raw());
}
- // Initialize cache of resolved names.
- const intptr_t kInitialNameCacheSize = 64;
- // The cache of resolved names in library scope is not serialized.
- library.InitResolvedNamesCache(kInitialNameCacheSize);
- library.Register(reader->thread());
+ // Initialize caches that are not serialized.
+ library.StorePointer(&library.raw_ptr()->resolved_names_, Array::null());
library.StorePointer(&library.raw_ptr()->exported_names_, Array::null());
- // Initialize cache of loaded scripts.
library.StorePointer(&library.raw_ptr()->loaded_scripts_, Array::null());
+ library.Register(reader->thread());
}
return library.raw();
}
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698