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

Unified Diff: runtime/vm/object.h

Issue 1902563002: Add per-library cache of exported names (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index c252a958b5d8a88fd6d9ea49440399b0f114b1db..53a22fc954bc2eb5c0dec9042ec10c246fe6e726 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -3531,7 +3531,8 @@ class Library : public Object {
void AddObject(const Object& obj, const String& name) const;
void ReplaceObject(const Object& obj, const String& name) const;
bool RemoveObject(const Object& obj, const String& name) const;
- RawObject* LookupReExport(const String& name) const;
+ RawObject* LookupReExport(const String& name,
+ ZoneGrowableArray<intptr_t>* visited = NULL) const;
RawObject* LookupObjectAllowPrivate(const String& name) const;
RawObject* LookupLocalObjectAllowPrivate(const String& name) const;
RawObject* LookupLocalObject(const String& name) const;
@@ -3584,7 +3585,6 @@ class Library : public Object {
// Library imports.
RawArray* imports() const { return raw_ptr()->imports_; }
RawArray* exports() const { return raw_ptr()->exports_; }
- RawArray* exports2() const { return raw_ptr()->exports2_; }
void AddImport(const Namespace& ns) const;
intptr_t num_imports() const { return raw_ptr()->num_imports_; }
RawNamespace* ImportAt(intptr_t index) const;
@@ -3710,12 +3710,19 @@ class Library : public Object {
RawArray* resolved_names() const { return raw_ptr()->resolved_names_; }
void InitResolvedNamesCache(intptr_t size,
SnapshotReader* reader = NULL) const;
- void GrowResolvedNamesCache() const;
+ void AllocateExportedNamesCache() const;
+ void InitExportedNamesCache() const;
+ static void InvalidateExportedNamesCaches();
bool LookupResolvedNamesCache(const String& name, Object* obj) const;
void AddToResolvedNamesCache(const String& name, const Object& obj) const;
void InvalidateResolvedName(const String& name) const;
void InvalidateResolvedNamesCache() const;
+ RawArray* exported_names() const { return raw_ptr()->exported_names_; }
+ bool LookupExportedNamesCache(const String& name, Object* obj) const;
+ void AddToExportedNamesCache(const String& name, const Object& obj) const;
+
+
void InitImportList() const;
void GrowDictionary(const Array& dict, intptr_t dict_size) const;
static RawLibrary* NewLibraryHelper(const String& url,
@@ -3736,6 +3743,7 @@ class Library : public Object {
friend class Bootstrap;
friend class Class;
friend class Debugger;
+ friend class Isolate;
friend class DictionaryIterator;
friend class Namespace;
friend class Object;
@@ -3758,7 +3766,8 @@ class Namespace : public Object {
}
bool HidesName(const String& name) const;
- RawObject* Lookup(const String& name) const;
+ RawObject* Lookup(const String& name,
+ ZoneGrowableArray<intptr_t>* trail = NULL) const;
static RawNamespace* New(const Library& library,
const Array& show_names,
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698