Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index cc0b267cd8abeec2cad152a4bf1eedd0520573c9..86616087ffb6687363a3deb88526f4ceb7a305cd 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -717,10 +717,12 @@ enum VariableMode { |
CONST_LEGACY, // declared via legacy 'const' declarations |
- LET, // declared via 'let' declarations |
+ LET, // declared via 'let' declarations (first lexical) |
CONST, // declared via 'const' declarations |
+ IMPORT, // declared via 'import' declarations (last lexical) |
+ |
// Variables introduced by the compiler: |
INTERNAL, // like VAR, but not user-visible (may or may not |
// be in a context) |
@@ -748,17 +750,17 @@ inline bool IsDynamicVariableMode(VariableMode mode) { |
inline bool IsDeclaredVariableMode(VariableMode mode) { |
- return mode >= VAR && mode <= CONST; |
+ return mode >= VAR && mode <= IMPORT; |
} |
inline bool IsLexicalVariableMode(VariableMode mode) { |
- return mode == LET || mode == CONST; |
+ return mode >= LET && mode <= IMPORT; |
} |
inline bool IsImmutableVariableMode(VariableMode mode) { |
- return mode == CONST || mode == CONST_LEGACY; |
+ return mode == CONST || mode == CONST_LEGACY || mode == IMPORT; |
} |