| Index: src/v8globals.h
|
| diff --git a/src/v8globals.h b/src/v8globals.h
|
| index af1d3aaa1fbf1ba2cae11a3a541a121425f8dc96..38fb02d07a9847fd9d05ddf0ff970da0c1fed9c0 100644
|
| --- a/src/v8globals.h
|
| +++ b/src/v8globals.h
|
| @@ -485,10 +485,10 @@ enum VariableMode {
|
|
|
| CONST, // declared via 'const' declarations
|
|
|
| - CONST_HARMONY, // declared via 'const' declarations in harmony mode
|
| -
|
| LET, // declared via 'let' declarations
|
|
|
| + CONST_HARMONY, // declared via 'const' declarations in harmony mode
|
| +
|
| // Variables introduced by the compiler:
|
| DYNAMIC, // always require dynamic lookup (we don't know
|
| // the declaration)
|
| @@ -510,6 +510,26 @@ enum VariableMode {
|
| };
|
|
|
|
|
| +inline bool IsDynamicVariableMode(VariableMode mode) {
|
| + return mode >= DYNAMIC && mode <= DYNAMIC_LOCAL;
|
| +}
|
| +
|
| +
|
| +inline bool IsDeclaredVariableMode(VariableMode mode) {
|
| + return mode >= VAR && mode <= CONST_HARMONY;
|
| +}
|
| +
|
| +
|
| +inline bool IsLexicalVariableMode(VariableMode mode) {
|
| + return mode >= LET && mode <= CONST_HARMONY;
|
| +}
|
| +
|
| +
|
| +inline bool IsImmutableVariableMode(VariableMode mode) {
|
| + return mode == CONST || mode == CONST_HARMONY;
|
| +}
|
| +
|
| +
|
| // ES6 Draft Rev3 10.2 specifies declarative environment records with mutable
|
| // and immutable bindings that can be in two states: initialized and
|
| // uninitialized. In ES5 only immutable bindings have these two states. When
|
|
|