Chromium Code Reviews| Index: src/ast/modules.h |
| diff --git a/src/ast/modules.h b/src/ast/modules.h |
| index a303c699178871e5273103ece4d8e54be27d0571..a62b6af29afd75e160081c4bb1f52aae8228dace 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 |
| + // cell_index_kind(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 cell_index_kind(int cell_index); |
|
adamk
2016/11/03 18:30:45
The underscore naming for a static method looks a
neis
2016/11/04 10:14:39
Done.
|
| + |
| // Module requests. |
| const ZoneMap<const AstRawString*, int>& module_requests() const { |
| return module_requests_; |