diff options
Diffstat (limited to 'deps/v8/src/variables.cc')
-rw-r--r-- | deps/v8/src/variables.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/deps/v8/src/variables.cc b/deps/v8/src/variables.cc index 32ad5bc5dd..0416f3a390 100644 --- a/deps/v8/src/variables.cc +++ b/deps/v8/src/variables.cc @@ -41,7 +41,7 @@ const char* Variable::Mode2String(VariableMode mode) { switch (mode) { case VAR: return "VAR"; case CONST: return "CONST"; - case CONST_HARMONY: return "CONST"; + case CONST_HARMONY: return "CONST_HARMONY"; case LET: return "LET"; case DYNAMIC: return "DYNAMIC"; case DYNAMIC_GLOBAL: return "DYNAMIC_GLOBAL"; @@ -81,10 +81,11 @@ Variable::Variable(Scope* scope, } -bool Variable::is_global() const { +bool Variable::IsGlobalObjectProperty() const { // Temporaries are never global, they must always be allocated in the // activation frame. - return mode_ != TEMPORARY && scope_ != NULL && scope_->is_global_scope(); + return mode_ != TEMPORARY && !IsLexicalVariableMode(mode_) + && scope_ != NULL && scope_->is_global_scope(); } |