| Index: src/globals.h
|
| diff --git a/src/globals.h b/src/globals.h
|
| index 7167423a48e125f96cf6254af65b467994f597f2..2747cbf619e2d8e5e0a5f0fdbb6c92d96436855d 100644
|
| --- a/src/globals.h
|
| +++ b/src/globals.h
|
| @@ -799,51 +799,48 @@ const double kMaxSafeInteger = 9007199254740991.0; // 2^53-1
|
| // The order of this enum has to be kept in sync with the predicates below.
|
| enum VariableMode {
|
| // User declared variables:
|
| - VAR, // declared via 'var', and 'function' declarations
|
| + VAR, // declared via 'var', and 'function' declarations
|
|
|
| - CONST_LEGACY, // declared via legacy 'const' declarations
|
| + CONST_LEGACY, // declared via legacy 'const' declarations
|
|
|
| - LET, // declared via 'let' declarations (first lexical)
|
| + LET, // declared via 'let' declarations (first lexical)
|
|
|
| - CONST, // declared via 'const' declarations
|
| -
|
| - IMPORT, // declared via 'import' declarations (last lexical)
|
| + CONST, // declared via 'const' declarations (last lexical)
|
|
|
| // Variables introduced by the compiler:
|
| - TEMPORARY, // temporary variables (not user-visible), stack-allocated
|
| - // unless the scope as a whole has forced context allocation
|
| + TEMPORARY, // temporary variables (not user-visible), stack-allocated
|
| + // unless the scope as a whole has forced context allocation
|
|
|
| - DYNAMIC, // always require dynamic lookup (we don't know
|
| - // the declaration)
|
| + DYNAMIC, // always require dynamic lookup (we don't know
|
| + // the declaration)
|
|
|
| DYNAMIC_GLOBAL, // requires dynamic lookup, but we know that the
|
| // variable is global unless it has been shadowed
|
| // by an eval-introduced variable
|
|
|
| - 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
|
| + 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
|
| };
|
|
|
| -
|
| inline bool IsDynamicVariableMode(VariableMode mode) {
|
| return mode >= DYNAMIC && mode <= DYNAMIC_LOCAL;
|
| }
|
|
|
|
|
| inline bool IsDeclaredVariableMode(VariableMode mode) {
|
| - return mode >= VAR && mode <= IMPORT;
|
| + return mode >= VAR && mode <= CONST;
|
| }
|
|
|
|
|
| inline bool IsLexicalVariableMode(VariableMode mode) {
|
| - return mode >= LET && mode <= IMPORT;
|
| + return mode >= LET && mode <= CONST;
|
| }
|
|
|
|
|
| inline bool IsImmutableVariableMode(VariableMode mode) {
|
| - return mode == CONST || mode == CONST_LEGACY || mode == IMPORT;
|
| + return mode == CONST || mode == CONST_LEGACY;
|
| }
|
|
|
|
|
|
|