Chromium Code Reviews

Unified Diff: src/globals.h

Issue 2199283002: [modules] Introduce new VariableLocation for module imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/globals.h
diff --git a/src/globals.h b/src/globals.h
index 71edc036bafea45f090503664d2b1c6af9f0d327..a7379d958d6eb9259983a7f72bf94f98518cc449 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -885,9 +885,6 @@ enum VariableMode {
LET, // declared via 'let' declarations (first lexical)
- // TODO(neis): Is it correct to make this one of the lexical modes?
- IMPORT, // declared via 'import' declarations (except namespace imports)
-
CONST, // declared via 'const' declarations (last lexical)
// Variables introduced by the compiler:
@@ -923,10 +920,9 @@ inline bool IsLexicalVariableMode(VariableMode mode) {
inline bool IsImmutableVariableMode(VariableMode mode) {
- return mode == CONST || mode == CONST_LEGACY || mode == IMPORT;
+ return mode == CONST || mode == CONST_LEGACY;
}
-
enum class VariableLocation {
// Before and during variable allocation, a variable whose location is
// not yet determined. After allocation, a variable looked up as a
@@ -957,9 +953,11 @@ enum class VariableLocation {
// A named slot in a heap context. name() is the variable name in the
// context object on the heap, with lookup starting at the current
// context. index() is invalid.
- LOOKUP
-};
+ LOOKUP,
+ // A named slot in a module's export table.
+ MODULE
+};
// ES6 Draft Rev3 10.2 specifies declarative environment records with mutable
// and immutable bindings that can be in two states: initialized and

Powered by Google App Engine