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

Unified Diff: runtime/vm/raw_object.h

Issue 208323015: Support deferred library prefix syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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
Index: runtime/vm/raw_object.h
===================================================================
--- runtime/vm/raw_object.h (revision 34312)
+++ runtime/vm/raw_object.h (working copy)
@@ -26,7 +26,6 @@
V(TokenStream) \
V(Script) \
V(Library) \
- V(LibraryPrefix) \
V(Namespace) \
V(Code) \
V(Instructions) \
@@ -46,6 +45,7 @@
V(UnhandledException) \
V(UnwindError) \
V(Instance) \
+ V(LibraryPrefix) \
V(AbstractType) \
V(Type) \
V(TypeRef) \
@@ -776,25 +776,13 @@
Dart_NativeEntryResolver native_entry_resolver_; // Resolves natives.
bool corelib_imported_;
bool debuggable_; // True if debugger can stop in library.
+ bool deferred_load_; // True if loading is deferred.
int8_t load_state_; // Of type LibraryState.
friend class Isolate;
};
-class RawLibraryPrefix : public RawObject {
- RAW_HEAP_OBJECT_IMPLEMENTATION(LibraryPrefix);
-
- RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
- RawString* name_; // library prefix name.
- RawArray* imports_; // libraries imported with this prefix.
- RawObject** to() {
- return reinterpret_cast<RawObject**>(&ptr()->imports_);
- }
- intptr_t num_imports_; // Number of library entries in libraries_.
-};
-
-
class RawNamespace : public RawObject {
RAW_HEAP_OBJECT_IMPLEMENTATION(Namespace);
@@ -1136,6 +1124,23 @@
};
+class RawLibraryPrefix : public RawInstance {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(LibraryPrefix);
+
+ RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
+ RawString* name_; // Library prefix name.
+ RawArray* imports_; // Libraries imported with this prefix.
+ RawArray* dependent_code_; // Code that refers to deferred, unloaded
+ // library prefix.
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->dependent_code_);
+ }
+ intptr_t num_imports_; // Number of library entries in libraries_.
+ bool is_deferred_load_;
+ bool is_loaded_;
+};
+
+
class RawAbstractType : public RawInstance {
protected:
enum TypeState {

Powered by Google App Engine
This is Rietveld 408576698