| Index: src/modules.h
|
| diff --git a/src/modules.h b/src/modules.h
|
| index 7dd7e26716bbbdab086ba1ecb064f3773d5afe2c..33afd6128d39efeddae014f49f31bee47ea4c7f3 100644
|
| --- a/src/modules.h
|
| +++ b/src/modules.h
|
| @@ -20,7 +20,7 @@ class ModuleDescriptor : public ZoneObject {
|
| // Factory methods.
|
|
|
| static ModuleDescriptor* New(Zone* zone) {
|
| - return new (zone) ModuleDescriptor();
|
| + return new (zone) ModuleDescriptor(zone);
|
| }
|
|
|
| // ---------------------------------------------------------------------------
|
| @@ -31,6 +31,10 @@ class ModuleDescriptor : public ZoneObject {
|
| void AddLocalExport(const AstRawString* export_name,
|
| const AstRawString* local_name, Zone* zone, bool* ok);
|
|
|
| + // Add module_specifier to the list of requested modules,
|
| + // if not already present.
|
| + void AddModuleRequest(const AstRawString* module_specifier, Zone* zone);
|
| +
|
| // Do not allow any further refinements, directly or through unification.
|
| void Freeze() { frozen_ = true; }
|
|
|
| @@ -61,6 +65,10 @@ class ModuleDescriptor : public ZoneObject {
|
| const AstRawString* LookupLocalExport(const AstRawString* export_name,
|
| Zone* zone);
|
|
|
| + const ZoneList<const AstRawString*>& requested_modules() const {
|
| + return requested_modules_;
|
| + }
|
| +
|
| // ---------------------------------------------------------------------------
|
| // Iterators.
|
|
|
| @@ -95,11 +103,16 @@ class ModuleDescriptor : public ZoneObject {
|
| // ---------------------------------------------------------------------------
|
| // Implementation.
|
| private:
|
| + explicit ModuleDescriptor(Zone* zone)
|
| + : frozen_(false),
|
| + exports_(NULL),
|
| + requested_modules_(1, zone),
|
| + index_(-1) {}
|
| +
|
| bool frozen_;
|
| ZoneHashMap* exports_; // Module exports and their types (allocated lazily)
|
| + ZoneList<const AstRawString*> requested_modules_;
|
| int index_;
|
| -
|
| - ModuleDescriptor() : frozen_(false), exports_(NULL), index_(-1) {}
|
| };
|
|
|
| } } // namespace v8::internal
|
|
|