| Index: src/ast/modules.h
|
| diff --git a/src/ast/modules.h b/src/ast/modules.h
|
| index a303c699178871e5273103ece4d8e54be27d0571..94550fb5c99b439a89855b565555e773ab228246 100644
|
| --- a/src/ast/modules.h
|
| +++ b/src/ast/modules.h
|
| @@ -86,10 +86,12 @@ class ModuleDescriptor : public ZoneObject {
|
| int module_request;
|
|
|
| // Import/export entries that are associated with a MODULE-allocated
|
| - // variable use the cell_index value to encode the location of their cell.
|
| - // Negative values are used for imports and positive values for exports.
|
| - // For entries that are not associated with a MODULE-allocated variable,
|
| - // cell_index is 0.
|
| + // variable (i.e. regular_imports and regular_exports after Validate) use
|
| + // the cell_index value to encode the location of their cell. During
|
| + // variable allocation, this will be be copied into the variable's index
|
| + // field.
|
| + // Entries that are not associated with a MODULE-allocated variable have
|
| + // GetCellIndexKind(cell_index) == kInvalid.
|
| int cell_index;
|
|
|
| // TODO(neis): Remove local_name component?
|
| @@ -109,6 +111,9 @@ class ModuleDescriptor : public ZoneObject {
|
| Handle<ModuleInfoEntry> entry);
|
| };
|
|
|
| + enum CellIndexKind { kInvalid, kExport, kImport };
|
| + static CellIndexKind GetCellIndexKind(int cell_index);
|
| +
|
| // Module requests.
|
| const ZoneMap<const AstRawString*, int>& module_requests() const {
|
| return module_requests_;
|
|
|