Index: src/ast/scopes.cc |
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
index 7c87ce39e95a44a8f8e8e1932b1a3f67b16e1d8f..bb5581bd28f040725dfc45cfaf12674205137e86 100644 |
--- a/src/ast/scopes.cc |
+++ b/src/ast/scopes.cc |
@@ -171,6 +171,7 @@ void Scope::SetDefaults(ScopeType scope_type, Scope* outer_scope, |
this_function_ = nullptr; |
illegal_redecl_ = nullptr; |
scope_inside_with_ = false; |
+ scope_inside_module_ = false; |
scope_contains_with_ = false; |
scope_calls_eval_ = false; |
scope_uses_arguments_ = false; |
@@ -311,8 +312,11 @@ void Scope::Initialize() { |
if (outer_scope_ != NULL) { |
outer_scope_->inner_scopes_.Add(this, zone()); |
scope_inside_with_ = outer_scope_->scope_inside_with_ || is_with_scope(); |
+ scope_inside_module_ = |
+ outer_scope_->scope_inside_module_ || is_module_scope(); |
} else { |
scope_inside_with_ = is_with_scope(); |
+ scope_inside_module_ = is_module_scope(); |
} |
// Declare convenience variables and the receiver. |
@@ -999,6 +1003,7 @@ void Scope::Print(int n) { |
Indent(n1, "// strict mode scope\n"); |
} |
if (scope_inside_with_) Indent(n1, "// scope inside 'with'\n"); |
+ if (scope_inside_module_) Indent(n1, "// scope inside module code\n"); |
if (scope_contains_with_) Indent(n1, "// scope contains 'with'\n"); |
if (scope_calls_eval_) Indent(n1, "// scope calls 'eval'\n"); |
if (scope_uses_arguments_) Indent(n1, "// scope uses 'arguments'\n"); |