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

Unified Diff: src/parsing/parser-base.h

Issue 1519073004: Remove always-on --harmony-rest-parameters flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/parsing/parser.cc ('k') | test/cctest/compiler/test-run-jsobjects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index 581015f5c9b88196869e988a16165481d66d3139..7f757977d9b68f353de5fa2db008b0376eb5f356 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -111,7 +111,6 @@ class ParserBase : public Traits {
allow_harmony_sloppy_(false),
allow_harmony_sloppy_function_(false),
allow_harmony_sloppy_let_(false),
- allow_harmony_rest_parameters_(false),
allow_harmony_default_parameters_(false),
allow_harmony_destructuring_bind_(false),
allow_harmony_destructuring_assignment_(false),
@@ -128,7 +127,6 @@ class ParserBase : public Traits {
ALLOW_ACCESSORS(harmony_sloppy);
ALLOW_ACCESSORS(harmony_sloppy_function);
ALLOW_ACCESSORS(harmony_sloppy_let);
- ALLOW_ACCESSORS(harmony_rest_parameters);
ALLOW_ACCESSORS(harmony_default_parameters);
ALLOW_ACCESSORS(harmony_destructuring_bind);
ALLOW_ACCESSORS(harmony_destructuring_assignment);
@@ -916,7 +914,6 @@ class ParserBase : public Traits {
bool allow_harmony_sloppy_;
bool allow_harmony_sloppy_function_;
bool allow_harmony_sloppy_let_;
- bool allow_harmony_rest_parameters_;
bool allow_harmony_default_parameters_;
bool allow_harmony_destructuring_bind_;
bool allow_harmony_destructuring_assignment_;
@@ -1329,7 +1326,7 @@ ParserBase<Traits>::ParsePrimaryExpression(ExpressionClassifier* classifier,
MessageTemplate::kUnexpectedToken,
Token::String(Token::RPAREN));
return factory()->NewEmptyParentheses(beg_pos);
- } else if (allow_harmony_rest_parameters() && Check(Token::ELLIPSIS)) {
+ } else if (Check(Token::ELLIPSIS)) {
// (...x)=>x. The continuation that looks for the => is in
// ParseAssignmentExpression.
int ellipsis_pos = position();
@@ -1464,7 +1461,7 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParseExpression(
}
Consume(Token::COMMA);
bool is_rest = false;
- if (allow_harmony_rest_parameters() && peek() == Token::ELLIPSIS) {
+ if (peek() == Token::ELLIPSIS) {
// 'x, y, ...z' in CoverParenthesizedExpressionAndArrowParameterList only
// as the formal parameters of'(x, y, ...z) => foo', and is not itself a
// valid expression or binding pattern.
@@ -2930,8 +2927,7 @@ void ParserBase<Traits>::ParseFormalParameterList(
*ok = false;
return;
}
- parameters->has_rest =
- allow_harmony_rest_parameters() && Check(Token::ELLIPSIS);
+ parameters->has_rest = Check(Token::ELLIPSIS);
ParseFormalParameter(parameters, classifier, ok);
if (!*ok) return;
} while (!parameters->has_rest && Check(Token::COMMA));
« no previous file with comments | « src/parsing/parser.cc ('k') | test/cctest/compiler/test-run-jsobjects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698