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

Unified Diff: src/preparser.h

Issue 1468143004: [es6] Self-assignment in a default parameter initializer should throw (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Change less behavior, add TODO Created 5 years, 1 month 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/parser.cc ('k') | test/message/default-parameter-tdz.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 8aab9198a490bf5265c59fd342d18234f8a8e26f..f3bd3a97b78e1f955aa81ac98fee62a590b74d69 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -1708,9 +1708,10 @@ class PreParserTraits {
return !tag.IsNoTemplateTag();
}
- void AddFormalParameter(
- PreParserFormalParameters* parameters, PreParserExpression pattern,
- PreParserExpression initializer, bool is_rest) {
+ void AddFormalParameter(PreParserFormalParameters* parameters,
+ PreParserExpression pattern,
+ PreParserExpression initializer,
+ int initializer_end_position, bool is_rest) {
++parameters->arity;
}
void DeclareFormalParameter(Scope* scope, PreParserIdentifier parameter,
@@ -3837,7 +3838,8 @@ void ParserBase<Traits>::ParseFormalParameter(
classifier->RecordNonSimpleParameter();
}
- Traits::AddFormalParameter(parameters, pattern, initializer, is_rest);
+ Traits::AddFormalParameter(parameters, pattern, initializer,
+ scanner()->location().end_pos, is_rest);
}
« no previous file with comments | « src/parser.cc ('k') | test/message/default-parameter-tdz.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698