Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(733)

Unified Diff: src/ast/scopes.cc

Issue 2009963002: [modules] Disable HTML-like comments Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Unify behavior for optimized and non-optimized executions Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/scopes.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index beffa53d74a971a1e39c02e8eb6dd5224b4c21f8..fb62d3c14730d55e58fae117edcd10b18c19fd9a 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -169,6 +169,7 @@ void Scope::SetDefaults(ScopeType scope_type, Scope* outer_scope,
arguments_ = nullptr;
this_function_ = nullptr;
scope_inside_with_ = false;
+ scope_inside_module_ = false;
scope_calls_eval_ = false;
scope_uses_arguments_ = false;
scope_uses_super_property_ = false;
@@ -306,8 +307,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.
@@ -964,6 +968,7 @@ void Scope::Print(int n) {
if (asm_module_) Indent(n1, "// scope is an asm module\n");
if (asm_function_) Indent(n1, "// scope is an asm function\n");
if (scope_inside_with_) Indent(n1, "// scope inside 'with'\n");
+ if (scope_inside_module_) Indent(n1, "// scope inside module\n");
if (scope_calls_eval_) Indent(n1, "// scope calls 'eval'\n");
if (scope_uses_arguments_) Indent(n1, "// scope uses 'arguments'\n");
if (scope_uses_super_property_)
« no previous file with comments | « src/ast/scopes.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698