Index: src/v8globals.h |
diff --git a/src/v8globals.h b/src/v8globals.h |
index 1d22a11032413533d9381ec142d66e6204a009d1..670ad2ef67c2642c6147c2c435bc436557693ed6 100644 |
--- a/src/v8globals.h |
+++ b/src/v8globals.h |
@@ -487,11 +487,19 @@ enum VariableMode { |
CONST, // declared via 'const' declarations |
- LET, // declared via 'let' declarations |
+ LET, // declared via 'let' declarations (first lexical) |
CONST_HARMONY, // declared via 'const' declarations in harmony mode |
+ MODULE, // declared via 'module' declaration (last lexical) |
+ |
// Variables introduced by the compiler: |
+ INTERNAL, // like VAR, but not user-visible (may or may not |
+ // be in a context) |
+ |
+ TEMPORARY, // temporary variables (not user-visible), never |
+ // in a context |
+ |
DYNAMIC, // always require dynamic lookup (we don't know |
// the declaration) |
@@ -499,16 +507,10 @@ enum VariableMode { |
// variable is global unless it has been shadowed |
// by an eval-introduced variable |
- DYNAMIC_LOCAL, // requires dynamic lookup, but we know that the |
+ DYNAMIC_LOCAL // requires dynamic lookup, but we know that the |
// variable is local and where it is unless it |
// has been shadowed by an eval-introduced |
// variable |
- |
- INTERNAL, // like VAR, but not user-visible (may or may not |
- // be in a context) |
- |
- TEMPORARY // temporary variables (not user-visible), never |
- // in a context |
}; |
@@ -518,17 +520,17 @@ inline bool IsDynamicVariableMode(VariableMode mode) { |
inline bool IsDeclaredVariableMode(VariableMode mode) { |
- return mode >= VAR && mode <= CONST_HARMONY; |
+ return mode >= VAR && mode <= MODULE; |
} |
inline bool IsLexicalVariableMode(VariableMode mode) { |
- return mode >= LET && mode <= CONST_HARMONY; |
+ return mode >= LET && mode <= MODULE; |
} |
inline bool IsImmutableVariableMode(VariableMode mode) { |
- return mode == CONST || mode == CONST_HARMONY; |
+ return mode == CONST || (mode >= CONST_HARMONY && mode <= MODULE); |
} |