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

Unified Diff: src/ast/scopes.h

Issue 1723313002: [parser] Enforce module-specific identifier restriction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | src/ast/scopes.cc » ('j') | src/parsing/preparser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 76f761dba3ceaf8cd0681982be7541dec60b3772..b1a789597f3d70acf57a7cead4d0e9304a5b3775 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -352,6 +352,9 @@ class Scope: public ZoneObject {
// Is this scope inside a with statement.
bool inside_with() const { return scope_inside_with_; }
+ // Is this scope inside module code.
+ bool inside_module() const { return scope_inside_module_; }
adamk 2016/02/23 22:37:15 Scope isn't the right place to put this, since it'
mike3 2016/02/24 16:20:54 Acknowledged.
+
// Does this scope access "arguments".
bool uses_arguments() const { return scope_uses_arguments_; }
// Does this scope access "super" property (super.foo).
@@ -653,6 +656,8 @@ class Scope: public ZoneObject {
//
// This scope is inside a 'with' of some outer scope.
bool scope_inside_with_;
+ // This scpope is inside module code
+ bool scope_inside_module_;
// This scope contains a 'with' statement.
bool scope_contains_with_;
// This scope or a nested catch scope or with scope contain an 'eval' call. At
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | src/parsing/preparser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698