Index: src/variables.cc |
diff --git a/src/variables.cc b/src/variables.cc |
index 0416f3a3908d321b35d2c647145e2ce7173ac4e0..916121791798489d434acb8637f088327891d62a 100644 |
--- a/src/variables.cc |
+++ b/src/variables.cc |
@@ -41,8 +41,9 @@ const char* Variable::Mode2String(VariableMode mode) { |
switch (mode) { |
case VAR: return "VAR"; |
case CONST: return "CONST"; |
- case CONST_HARMONY: return "CONST_HARMONY"; |
case LET: return "LET"; |
+ case CONST_HARMONY: return "CONST_HARMONY"; |
+ case MODULE: return "MODULE"; |
case DYNAMIC: return "DYNAMIC"; |
case DYNAMIC_GLOBAL: return "DYNAMIC_GLOBAL"; |
case DYNAMIC_LOCAL: return "DYNAMIC_LOCAL"; |
@@ -84,7 +85,8 @@ Variable::Variable(Scope* scope, |
bool Variable::IsGlobalObjectProperty() const { |
// Temporaries are never global, they must always be allocated in the |
// activation frame. |
- return mode_ != TEMPORARY && !IsLexicalVariableMode(mode_) |
+ return (IsDynamicVariableMode(mode_) || |
+ (IsDeclaredVariableMode(mode_) && !IsLexicalVariableMode(mode_))) |
&& scope_ != NULL && scope_->is_global_scope(); |
} |