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

Unified Diff: src/parser.h

Issue 1303013007: [es6] Remaining cases of parameter scopes for sloppy eval (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/parser.cc » ('j') | src/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 602b5278ea813cb20083df5e99465c7466975abd..355778b042d3368b3f340cc58f08a357bc7879a4 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -546,6 +546,9 @@ struct ParserFormalParameters : FormalParametersBase {
Expression* pattern;
Expression* initializer;
bool is_rest;
+ bool is_simple() const {
+ return pattern->IsVariableProxy() && initializer == nullptr && !is_rest;
+ }
};
explicit ParserFormalParameters(Scope* scope)
« no previous file with comments | « no previous file | src/parser.cc » ('j') | src/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698