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

Unified Diff: runtime/vm/object.h

Issue 328923002: Lazy loading of deferred libraries (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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/dart_api_impl.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
===================================================================
--- runtime/vm/object.h (revision 37317)
+++ runtime/vm/object.h (working copy)
@@ -2593,9 +2593,13 @@
bool LoadNotStarted() const {
return raw_ptr()->load_state_ == RawLibrary::kAllocated;
}
+ bool LoadRequested() const {
+ return raw_ptr()->load_state_ == RawLibrary::kLoadRequested;
+ }
bool LoadInProgress() const {
return raw_ptr()->load_state_ == RawLibrary::kLoadInProgress;
}
+ void SetLoadRequested() const;
void SetLoadInProgress() const;
bool Loaded() const { return raw_ptr()->load_state_ == RawLibrary::kLoaded; }
void SetLoaded() const;
@@ -4294,6 +4298,7 @@
RawArray* imports() const { return raw_ptr()->imports_; }
intptr_t num_imports() const { return raw_ptr()->num_imports_; }
+ RawLibrary* importer() const { return raw_ptr()->importer_; }
bool ContainsLibrary(const Library& library) const;
RawLibrary* GetLibrary(int index) const;
@@ -4303,7 +4308,7 @@
bool is_deferred_load() const { return raw_ptr()->is_deferred_load_; }
bool is_loaded() const { return raw_ptr()->is_loaded_; }
- void LoadLibrary() const;
+ bool LoadLibrary() const;
// Return the list of code objects that were compiled when this
// prefix was not yet loaded. These code objects will be invalidated
@@ -4321,7 +4326,8 @@
static RawLibraryPrefix* New(const String& name,
const Namespace& import,
- bool deferred_load);
+ bool deferred_load,
+ const Library& importer);
private:
static const int kInitialSize = 2;
@@ -4330,6 +4336,7 @@
void set_name(const String& value) const;
void set_imports(const Array& value) const;
void set_num_imports(intptr_t value) const;
+ void set_importer(const Library& value) const;
void set_is_loaded() const;
static RawLibraryPrefix* New();
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698