Commit 5ceb4fec authored by adamk's avatar adamk Committed by Commit bot

Remove always-on --harmony-rest-parameters flag

It shipped in Chrome 47.

Review URL: https://codereview.chromium.org/1519073004

Cr-Commit-Position: refs/heads/master@{#32816}
parent ebdd9014
...@@ -2102,7 +2102,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes) ...@@ -2102,7 +2102,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_function) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_function)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_let) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_let)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_default_parameters) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_default_parameters)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring_bind) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring_bind)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring_assignment) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring_assignment)
...@@ -2633,7 +2632,6 @@ bool Genesis::InstallExperimentalNatives() { ...@@ -2633,7 +2632,6 @@ bool Genesis::InstallExperimentalNatives() {
static const char* harmony_sloppy_function_natives[] = {nullptr}; static const char* harmony_sloppy_function_natives[] = {nullptr};
static const char* harmony_sloppy_let_natives[] = {nullptr}; static const char* harmony_sloppy_let_natives[] = {nullptr};
static const char* harmony_unicode_regexps_natives[] = {nullptr}; static const char* harmony_unicode_regexps_natives[] = {nullptr};
static const char* harmony_rest_parameters_natives[] = {nullptr};
static const char* harmony_default_parameters_natives[] = {nullptr}; static const char* harmony_default_parameters_natives[] = {nullptr};
static const char* harmony_reflect_natives[] = {"native harmony-reflect.js", static const char* harmony_reflect_natives[] = {"native harmony-reflect.js",
nullptr}; nullptr};
......
...@@ -222,7 +222,6 @@ DEFINE_IMPLICATION(es_staging, harmony_destructuring_assignment) ...@@ -222,7 +222,6 @@ DEFINE_IMPLICATION(es_staging, harmony_destructuring_assignment)
V(harmony_array_includes, "harmony Array.prototype.includes") \ V(harmony_array_includes, "harmony Array.prototype.includes") \
V(harmony_default_parameters, "harmony default parameters") \ V(harmony_default_parameters, "harmony default parameters") \
V(harmony_destructuring_bind, "harmony destructuring bind") \ V(harmony_destructuring_bind, "harmony destructuring bind") \
V(harmony_rest_parameters, "harmony rest parameters") \
V(harmony_concat_spreadable, "harmony isConcatSpreadable") \ V(harmony_concat_spreadable, "harmony isConcatSpreadable") \
V(harmony_tolength, "harmony ToLength") \ V(harmony_tolength, "harmony ToLength") \
V(harmony_tostring, "harmony toString") \ V(harmony_tostring, "harmony toString") \
......
...@@ -111,7 +111,6 @@ class ParserBase : public Traits { ...@@ -111,7 +111,6 @@ class ParserBase : public Traits {
allow_harmony_sloppy_(false), allow_harmony_sloppy_(false),
allow_harmony_sloppy_function_(false), allow_harmony_sloppy_function_(false),
allow_harmony_sloppy_let_(false), allow_harmony_sloppy_let_(false),
allow_harmony_rest_parameters_(false),
allow_harmony_default_parameters_(false), allow_harmony_default_parameters_(false),
allow_harmony_destructuring_bind_(false), allow_harmony_destructuring_bind_(false),
allow_harmony_destructuring_assignment_(false), allow_harmony_destructuring_assignment_(false),
...@@ -128,7 +127,6 @@ class ParserBase : public Traits { ...@@ -128,7 +127,6 @@ class ParserBase : public Traits {
ALLOW_ACCESSORS(harmony_sloppy); ALLOW_ACCESSORS(harmony_sloppy);
ALLOW_ACCESSORS(harmony_sloppy_function); ALLOW_ACCESSORS(harmony_sloppy_function);
ALLOW_ACCESSORS(harmony_sloppy_let); ALLOW_ACCESSORS(harmony_sloppy_let);
ALLOW_ACCESSORS(harmony_rest_parameters);
ALLOW_ACCESSORS(harmony_default_parameters); ALLOW_ACCESSORS(harmony_default_parameters);
ALLOW_ACCESSORS(harmony_destructuring_bind); ALLOW_ACCESSORS(harmony_destructuring_bind);
ALLOW_ACCESSORS(harmony_destructuring_assignment); ALLOW_ACCESSORS(harmony_destructuring_assignment);
...@@ -916,7 +914,6 @@ class ParserBase : public Traits { ...@@ -916,7 +914,6 @@ class ParserBase : public Traits {
bool allow_harmony_sloppy_; bool allow_harmony_sloppy_;
bool allow_harmony_sloppy_function_; bool allow_harmony_sloppy_function_;
bool allow_harmony_sloppy_let_; bool allow_harmony_sloppy_let_;
bool allow_harmony_rest_parameters_;
bool allow_harmony_default_parameters_; bool allow_harmony_default_parameters_;
bool allow_harmony_destructuring_bind_; bool allow_harmony_destructuring_bind_;
bool allow_harmony_destructuring_assignment_; bool allow_harmony_destructuring_assignment_;
...@@ -1329,7 +1326,7 @@ ParserBase<Traits>::ParsePrimaryExpression(ExpressionClassifier* classifier, ...@@ -1329,7 +1326,7 @@ ParserBase<Traits>::ParsePrimaryExpression(ExpressionClassifier* classifier,
MessageTemplate::kUnexpectedToken, MessageTemplate::kUnexpectedToken,
Token::String(Token::RPAREN)); Token::String(Token::RPAREN));
return factory()->NewEmptyParentheses(beg_pos); 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 // (...x)=>x. The continuation that looks for the => is in
// ParseAssignmentExpression. // ParseAssignmentExpression.
int ellipsis_pos = position(); int ellipsis_pos = position();
...@@ -1464,7 +1461,7 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParseExpression( ...@@ -1464,7 +1461,7 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParseExpression(
} }
Consume(Token::COMMA); Consume(Token::COMMA);
bool is_rest = false; bool is_rest = false;
if (allow_harmony_rest_parameters() && peek() == Token::ELLIPSIS) { if (peek() == Token::ELLIPSIS) {
// 'x, y, ...z' in CoverParenthesizedExpressionAndArrowParameterList only // 'x, y, ...z' in CoverParenthesizedExpressionAndArrowParameterList only
// as the formal parameters of'(x, y, ...z) => foo', and is not itself a // as the formal parameters of'(x, y, ...z) => foo', and is not itself a
// valid expression or binding pattern. // valid expression or binding pattern.
...@@ -2930,8 +2927,7 @@ void ParserBase<Traits>::ParseFormalParameterList( ...@@ -2930,8 +2927,7 @@ void ParserBase<Traits>::ParseFormalParameterList(
*ok = false; *ok = false;
return; return;
} }
parameters->has_rest = parameters->has_rest = Check(Token::ELLIPSIS);
allow_harmony_rest_parameters() && Check(Token::ELLIPSIS);
ParseFormalParameter(parameters, classifier, ok); ParseFormalParameter(parameters, classifier, ok);
if (!*ok) return; if (!*ok) return;
} while (!parameters->has_rest && Check(Token::COMMA)); } while (!parameters->has_rest && Check(Token::COMMA));
......
...@@ -926,7 +926,6 @@ Parser::Parser(ParseInfo* info) ...@@ -926,7 +926,6 @@ Parser::Parser(ParseInfo* info)
set_allow_harmony_sloppy(FLAG_harmony_sloppy); set_allow_harmony_sloppy(FLAG_harmony_sloppy);
set_allow_harmony_sloppy_function(FLAG_harmony_sloppy_function); set_allow_harmony_sloppy_function(FLAG_harmony_sloppy_function);
set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let); set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let);
set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters);
set_allow_harmony_default_parameters(FLAG_harmony_default_parameters); set_allow_harmony_default_parameters(FLAG_harmony_default_parameters);
set_allow_harmony_destructuring_bind(FLAG_harmony_destructuring_bind); set_allow_harmony_destructuring_bind(FLAG_harmony_destructuring_bind);
set_allow_harmony_destructuring_assignment( set_allow_harmony_destructuring_assignment(
...@@ -4905,7 +4904,6 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser( ...@@ -4905,7 +4904,6 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
SET_ALLOW(natives); SET_ALLOW(natives);
SET_ALLOW(harmony_sloppy); SET_ALLOW(harmony_sloppy);
SET_ALLOW(harmony_sloppy_let); SET_ALLOW(harmony_sloppy_let);
SET_ALLOW(harmony_rest_parameters);
SET_ALLOW(harmony_default_parameters); SET_ALLOW(harmony_default_parameters);
SET_ALLOW(harmony_destructuring_bind); SET_ALLOW(harmony_destructuring_bind);
SET_ALLOW(strong_mode); SET_ALLOW(strong_mode);
......
...@@ -1392,9 +1392,6 @@ void ParserTraits::AddFormalParameter(ParserFormalParameters* parameters, ...@@ -1392,9 +1392,6 @@ void ParserTraits::AddFormalParameter(ParserFormalParameters* parameters,
bool is_rest) { bool is_rest) {
bool is_simple = bool is_simple =
!is_rest && pattern->IsVariableProxy() && initializer == nullptr; !is_rest && pattern->IsVariableProxy() && initializer == nullptr;
DCHECK(parser_->allow_harmony_destructuring_bind() ||
parser_->allow_harmony_rest_parameters() ||
parser_->allow_harmony_default_parameters() || is_simple);
const AstRawString* name = is_simple const AstRawString* name = is_simple
? pattern->AsVariableProxy()->raw_name() ? pattern->AsVariableProxy()->raw_name()
: parser_->ast_value_factory()->empty_string(); : parser_->ast_value_factory()->empty_string();
......
...@@ -35,7 +35,6 @@ TEST(ArgumentsUnmapped) { ...@@ -35,7 +35,6 @@ TEST(ArgumentsUnmapped) {
TEST(ArgumentsRest) { TEST(ArgumentsRest) {
FLAG_harmony_rest_parameters = true;
FunctionTester T("(function(a, ...args) { return args; })"); FunctionTester T("(function(a, ...args) { return args; })");
Handle<Object> arguments; Handle<Object> arguments;
......
...@@ -1504,7 +1504,6 @@ enum ParserFlag { ...@@ -1504,7 +1504,6 @@ enum ParserFlag {
kAllowLazy, kAllowLazy,
kAllowNatives, kAllowNatives,
kAllowHarmonyDefaultParameters, kAllowHarmonyDefaultParameters,
kAllowHarmonyRestParameters,
kAllowHarmonySloppy, kAllowHarmonySloppy,
kAllowHarmonySloppyLet, kAllowHarmonySloppyLet,
kAllowHarmonyDestructuring, kAllowHarmonyDestructuring,
...@@ -1528,8 +1527,6 @@ void SetParserFlags(i::ParserBase<Traits>* parser, ...@@ -1528,8 +1527,6 @@ void SetParserFlags(i::ParserBase<Traits>* parser,
parser->set_allow_natives(flags.Contains(kAllowNatives)); parser->set_allow_natives(flags.Contains(kAllowNatives));
parser->set_allow_harmony_default_parameters( parser->set_allow_harmony_default_parameters(
flags.Contains(kAllowHarmonyDefaultParameters)); flags.Contains(kAllowHarmonyDefaultParameters));
parser->set_allow_harmony_rest_parameters(
flags.Contains(kAllowHarmonyRestParameters));
parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy)); parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy));
parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet)); parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet));
parser->set_allow_harmony_destructuring_bind( parser->set_allow_harmony_destructuring_bind(
...@@ -3687,9 +3684,7 @@ TEST(ErrorsArrowFormalParameters) { ...@@ -3687,9 +3684,7 @@ TEST(ErrorsArrowFormalParameters) {
nullptr nullptr
}; };
static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters}; RunParserSyncTest(context_data, assignment_expression_suffix_data, kError);
RunParserSyncTest(context_data, assignment_expression_suffix_data, kError,
NULL, 0, always_flags, arraysize(always_flags));
} }
...@@ -3881,7 +3876,6 @@ TEST(NoErrorsArrowFunctions) { ...@@ -3881,7 +3876,6 @@ TEST(NoErrorsArrowFunctions) {
}; };
static const ParserFlag always_flags[] = {kAllowHarmonyDefaultParameters, static const ParserFlag always_flags[] = {kAllowHarmonyDefaultParameters,
kAllowHarmonyRestParameters,
kAllowHarmonyDestructuring}; kAllowHarmonyDestructuring};
RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0, RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
always_flags, arraysize(always_flags)); always_flags, arraysize(always_flags));
...@@ -3988,7 +3982,6 @@ TEST(ArrowFunctionsYieldParameterNameInGenerator) { ...@@ -3988,7 +3982,6 @@ TEST(ArrowFunctionsYieldParameterNameInGenerator) {
}; };
static const ParserFlag always_flags[] = { kAllowHarmonyDestructuring, static const ParserFlag always_flags[] = { kAllowHarmonyDestructuring,
kAllowHarmonyRestParameters,
kAllowStrongMode}; kAllowStrongMode};
RunParserSyncTest(sloppy_function_context_data, arrow_data, kSuccess, NULL, 0, RunParserSyncTest(sloppy_function_context_data, arrow_data, kSuccess, NULL, 0,
always_flags, arraysize(always_flags)); always_flags, arraysize(always_flags));
...@@ -5315,9 +5308,7 @@ TEST(ParseRestParameters) { ...@@ -5315,9 +5308,7 @@ TEST(ParseRestParameters) {
"...\t\n\t\t\n args", "...\t\n\t\t\n args",
"a, ... \n \n args", "a, ... \n \n args",
NULL}; NULL};
static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters}; RunParserSyncTest(context_data, data, kSuccess);
RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
arraysize(always_flags));
} }
...@@ -5347,9 +5338,7 @@ TEST(ParseRestParametersErrors) { ...@@ -5347,9 +5338,7 @@ TEST(ParseRestParametersErrors) {
"a,\ra, ...args", "a,\ra, ...args",
"a,\na, ...args", "a,\na, ...args",
NULL}; NULL};
static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters}; RunParserSyncTest(context_data, data, kError);
RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
arraysize(always_flags));
} }
...@@ -5364,8 +5353,7 @@ TEST(RestParameterInSetterMethodError) { ...@@ -5364,8 +5353,7 @@ TEST(RestParameterInSetterMethodError) {
{nullptr, nullptr}}; {nullptr, nullptr}};
const char* data[] = {"...a", "...arguments", "...eval", nullptr}; const char* data[] = {"...a", "...arguments", "...eval", nullptr};
static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters, static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
kAllowHarmonySloppy};
RunParserSyncTest(context_data, data, kError, nullptr, 0, always_flags, RunParserSyncTest(context_data, data, kError, nullptr, 0, always_flags,
arraysize(always_flags)); arraysize(always_flags));
} }
...@@ -5388,15 +5376,11 @@ TEST(RestParametersEvalArguments) { ...@@ -5388,15 +5376,11 @@ TEST(RestParametersEvalArguments) {
"arguments, ...args", "arguments, ...args",
NULL}; NULL};
static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters};
// Fail in strict mode // Fail in strict mode
RunParserSyncTest(strict_context_data, data, kError, NULL, 0, always_flags, RunParserSyncTest(strict_context_data, data, kError);
arraysize(always_flags));
// OK in sloppy mode // OK in sloppy mode
RunParserSyncTest(sloppy_context_data, data, kSuccess, NULL, 0, always_flags, RunParserSyncTest(sloppy_context_data, data, kSuccess);
arraysize(always_flags));
} }
...@@ -5415,12 +5399,9 @@ TEST(RestParametersDuplicateEvalArguments) { ...@@ -5415,12 +5399,9 @@ TEST(RestParametersDuplicateEvalArguments) {
"arguments, arguments, ...args", "arguments, arguments, ...args",
NULL}; NULL};
static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters};
// In strict mode, the error is using "eval" or "arguments" as parameter names // In strict mode, the error is using "eval" or "arguments" as parameter names
// In sloppy mode, the error is that eval / arguments are duplicated // In sloppy mode, the error is that eval / arguments are duplicated
RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, RunParserSyncTest(context_data, data, kError);
arraysize(always_flags));
} }
...@@ -6254,8 +6235,7 @@ TEST(StrongConstructorDirective) { ...@@ -6254,8 +6235,7 @@ TEST(StrongConstructorDirective) {
"foo() { \"use strong\" } constructor() {}", NULL}; "foo() { \"use strong\" } constructor() {}", NULL};
static const ParserFlag always_flags[] = { static const ParserFlag always_flags[] = {
kAllowHarmonyRestParameters, kAllowHarmonySloppy, kAllowHarmonySloppyLet, kAllowHarmonySloppy, kAllowHarmonySloppyLet, kAllowStrongMode};
kAllowStrongMode};
RunParserSyncTest(context_data, error_data, kError, NULL, 0, always_flags, RunParserSyncTest(context_data, error_data, kError, NULL, 0, always_flags,
arraysize(always_flags)); arraysize(always_flags));
...@@ -7187,9 +7167,7 @@ TEST(DestructuringDisallowPatternsInSingleParamArrows) { ...@@ -7187,9 +7167,7 @@ TEST(DestructuringDisallowPatternsInSingleParamArrows) {
TEST(DestructuringDisallowPatternsInRestParams) { TEST(DestructuringDisallowPatternsInRestParams) {
i::FLAG_harmony_destructuring_bind = true; i::FLAG_harmony_destructuring_bind = true;
i::FLAG_harmony_rest_parameters = true; static const ParserFlag always_flags[] = {kAllowHarmonyDestructuring};
static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters,
kAllowHarmonyDestructuring};
const char* context_data[][2] = {{"'use strict';", ""}, const char* context_data[][2] = {{"'use strict';", ""},
{"function outer() { 'use strict';", "}"}, {"function outer() { 'use strict';", "}"},
{"", ""}, {"", ""},
...@@ -7551,7 +7529,7 @@ TEST(LanguageModeDirectivesNonSimpleParameterListErrors) { ...@@ -7551,7 +7529,7 @@ TEST(LanguageModeDirectivesNonSimpleParameterListErrors) {
static const ParserFlag always_flags[] = { static const ParserFlag always_flags[] = {
kAllowHarmonyDefaultParameters, kAllowHarmonyDestructuring, kAllowHarmonyDefaultParameters, kAllowHarmonyDestructuring,
kAllowHarmonyRestParameters, kAllowHarmonySloppy, kAllowStrongMode}; kAllowHarmonySloppy, kAllowStrongMode};
RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
arraysize(always_flags)); arraysize(always_flags));
} }
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
"path": ["RestParameters"], "path": ["RestParameters"],
"main": "run.js", "main": "run.js",
"resources": ["rest.js"], "resources": ["rest.js"],
"flags": ["--harmony-rest-parameters"],
"run_count": 5, "run_count": 5,
"units": "score", "units": "score",
"results_regexp": "^%s\\-RestParameters\\(Score\\): (.+)$", "results_regexp": "^%s\\-RestParameters\\(Score\\): (.+)$",
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-rest-parameters //
...x => 10 ...x => 10
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-rest-parameters //
function foo() { return(); } function foo() { return(); }
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-rest-parameters //
(w, ...x, y) => 10 (w, ...x, y) => 10
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-rest-parameters //
(...x, y) => 10 (...x, y) => 10
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-rest-parameters //
(w, ...x, ...y) => 10 (w, ...x, ...y) => 10
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-rest-parameters //
function foo(...b, a) { return a } function foo(...b, a) { return a }
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-rest-parameters //
(x, ...y, z) (x, ...y, z)
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-rest-parameters //
(x, ...y) (x, ...y)
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-rest-parameters //
'use strict'; 'use strict';
var _bad = "setting this should fail!"; var _bad = "setting this should fail!";
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-rest-parameters //
var _bad = "this should fail!"; var _bad = "this should fail!";
({ ({
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-rest-parameters //
'use strict'; 'use strict';
var _bad = "this should fail!"; var _bad = "this should fail!";
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-rest-parameters
// Flags: --min-preparse-length=0 // Flags: --min-preparse-length=0
(function testRestIndex() { (function testRestIndex() {
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-rest-parameters
(function testRestIndex() { (function testRestIndex() {
assertEquals(5, ((...args) => args.length)(1,2,3,4,5)); assertEquals(5, ((...args) => args.length)(1,2,3,4,5));
assertEquals(4, ((a, ...args) => args.length)(1,2,3,4,5)); assertEquals(4, ((a, ...args) => args.length)(1,2,3,4,5));
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-reflect --harmony-destructuring-bind --harmony-rest-parameters // Flags: --harmony-reflect --harmony-destructuring-bind
(function TestClass() { (function TestClass() {
......
// Copyright 2015 the V8 project authors. All rights reserved. // Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-rest-parameters
assertThrows("()=>{}()", SyntaxError); assertThrows("()=>{}()", SyntaxError);
assertThrows("x=>{}()", SyntaxError); assertThrows("x=>{}()", SyntaxError);
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-rest-parameters
// Flags: --allow-natives-syntax // Flags: --allow-natives-syntax
var f = (a, b, ...c) => { var f = (a, b, ...c) => {
......
...@@ -2,6 +2,4 @@ ...@@ -2,6 +2,4 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-rest-parameters
(function(...a) { function f() { eval() } })(); (function(...a) { function f() { eval() } })();
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-rest-parameters
// Flags: --min-preparse-length=0 // Flags: --min-preparse-length=0
function variadic(co, ...values) { function variadic(co, ...values) {
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-rest-parameters
(function testRestIndex() { (function testRestIndex() {
assertEquals(5, (function(...args) { return args.length; })(1,2,3,4,5)); assertEquals(5, (function(...args) { return args.length; })(1,2,3,4,5));
assertEquals(4, (function(a, ...args) { return args.length; })(1,2,3,4,5)); assertEquals(4, (function(a, ...args) { return args.length; })(1,2,3,4,5));
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy --harmony-rest-parameters // Flags: --harmony-sloppy
(function testConstructClassStrict() { (function testConstructClassStrict() {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy --harmony-rest-parameters // Flags: --harmony-sloppy
(function testCallSuperPropertyStrict() { (function testCallSuperPropertyStrict() {
"use strict"; "use strict";
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --allow-natives-syntax // Flags: --allow-natives-syntax
// Flags: --harmony-destructuring-bind --harmony-rest-parameters --harmony-sloppy // Flags: --harmony-destructuring-bind --harmony-sloppy
(function TestSuperNamedLoads() { (function TestSuperNamedLoads() {
function Base() { } function Base() { }
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
// Flags: --no-legacy-const --harmony-sloppy --harmony-sloppy-let // Flags: --no-legacy-const --harmony-sloppy --harmony-sloppy-let
// Flags: --harmony-sloppy-function --harmony-destructuring-bind // Flags: --harmony-sloppy-function --harmony-destructuring-bind
// Flags: --harmony-rest-parameters
// Test Annex B 3.3 semantics for functions declared in blocks in sloppy mode. // Test Annex B 3.3 semantics for functions declared in blocks in sloppy mode.
// http://www.ecma-international.org/ecma-262/6.0/#sec-block-level-function-declarations-web-legacy-compatibility-semantics // http://www.ecma-international.org/ecma-262/6.0/#sec-block-level-function-declarations-web-legacy-compatibility-semantics
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-default-parameters --harmony-rest-parameters // Flags: --harmony-default-parameters
(function TestDefaults() { (function TestDefaults() {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-destructuring-bind // Flags: --harmony-destructuring-bind
// Flags: --harmony-default-parameters --harmony-rest-parameters // Flags: --harmony-default-parameters
(function TestObjectLiteralPattern() { (function TestObjectLiteralPattern() {
var { x : x, y : y, get, set } = { x : 1, y : 2, get: 3, set: 4 }; var { x : x, y : y, get, set } = { x : 1, y : 2, get: 3, set: 4 };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --strong-mode --harmony-rest-parameters // Flags: --strong-mode
// Note that it's essential for these tests that the reference is inside dead // Note that it's essential for these tests that the reference is inside dead
// code (because we already produce ReferenceErrors for run-time unresolved // code (because we already produce ReferenceErrors for run-time unresolved
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --strong-mode --harmony-reflect // Flags: --strong-mode --harmony-reflect
// Flags: --harmony-rest-parameters --allow-natives-syntax // Flags: --allow-natives-syntax
'use strict'; 'use strict';
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --strong-mode --allow-natives-syntax // Flags: --strong-mode --allow-natives-syntax
// Flags: --harmony-rest-parameters
// Flags: --harmony-destructuring-bind // Flags: --harmony-destructuring-bind
'use strict'; 'use strict';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment