Chromium Code Reviews| Index: runtime/vm/raw_object.h |
| =================================================================== |
| --- runtime/vm/raw_object.h (revision 12740) |
| +++ runtime/vm/raw_object.h (working copy) |
| @@ -31,6 +31,7 @@ |
| V(Script) \ |
| V(Library) \ |
| V(LibraryPrefix) \ |
| + V(Namespace) \ |
| V(Code) \ |
| V(Instructions) \ |
| V(PcDescriptors) \ |
| @@ -722,8 +723,7 @@ |
| RawString* private_key_; |
| RawArray* dictionary_; // Top-level names in this library. |
| RawArray* anonymous_classes_; // Classes containing top-level elements. |
| - RawArray* imports_; // List of libraries imported without prefix. |
| - // is imported into without a prefix. |
| + RawArray* imports_; // List of Namespaces imported without prefix. |
| RawArray* loaded_scripts_; // Array of scripts loaded in this library. |
| RawObject** to() { |
| return reinterpret_cast<RawObject**>(&ptr()->loaded_scripts_); |
| @@ -746,14 +746,29 @@ |
| RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
| RawString* name_; // library prefix name. |
| - RawArray* libraries_; // libraries imported with this prefix. |
| + RawArray* imports_; // libraries imported with this prefix. |
|
siva
2012/09/24 18:28:51
Comment should be namespaces imported with this pr
|
| RawObject** to() { |
| - return reinterpret_cast<RawObject**>(&ptr()->libraries_); |
| + return reinterpret_cast<RawObject**>(&ptr()->imports_); |
| } |
| - intptr_t num_libs_; // Number of library entries in libraries_. |
| + intptr_t num_imports_; // Number of library entries in libraries_. |
|
siva
2012/09/24 18:28:51
Comment should be number of namespace entries in i
|
| }; |
| +class RawNamespace : public RawObject { |
| + RAW_HEAP_OBJECT_IMPLEMENTATION(Namespace); |
| + |
| + RawObject** from() { |
| + return reinterpret_cast<RawObject**>(&ptr()->library_); |
| + } |
| + RawLibrary* library_; // library with name dictionary. |
| + RawArray* show_names_; // list of names that are exported. |
| + RawArray* hide_names_; // blacklist of names that are not exported. |
|
siva
2012/09/24 18:28:51
why blacklist?
list of names that are not exporte
|
| + RawObject** to() { |
| + return reinterpret_cast<RawObject**>(&ptr()->hide_names_); |
| + } |
| +}; |
| + |
| + |
| class RawCode : public RawObject { |
| RAW_HEAP_OBJECT_IMPLEMENTATION(Code); |