Index: src/variables.cc |
diff --git a/src/variables.cc b/src/variables.cc |
index 64311d925d92c16bd04a6a2316a69b1db0e7d814..0416f3a3908d321b35d2c647145e2ce7173ac4e0 100644 |
--- a/src/variables.cc |
+++ b/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"; |
@@ -84,7 +84,7 @@ Variable::Variable(Scope* scope, |
bool Variable::IsGlobalObjectProperty() const { |
// Temporaries are never global, they must always be allocated in the |
// activation frame. |
- return mode_ != TEMPORARY && mode_ != LET && mode_ != CONST_HARMONY |
+ return mode_ != TEMPORARY && !IsLexicalVariableMode(mode_) |
&& scope_ != NULL && scope_->is_global_scope(); |
} |