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

Unified Diff: test/cctest/test-parsing.cc

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 | « test/cctest/compiler/test-run-jsobjects.cc ('k') | test/js-perf-test/JSTests.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index bdc6dc380fed12ca8b830a54e8f5eaab69855b7b..74dd2097904503eeb4ced0fcd86439af29c352e6 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -1504,7 +1504,6 @@ enum ParserFlag {
kAllowLazy,
kAllowNatives,
kAllowHarmonyDefaultParameters,
- kAllowHarmonyRestParameters,
kAllowHarmonySloppy,
kAllowHarmonySloppyLet,
kAllowHarmonyDestructuring,
@@ -1528,8 +1527,6 @@ void SetParserFlags(i::ParserBase<Traits>* parser,
parser->set_allow_natives(flags.Contains(kAllowNatives));
parser->set_allow_harmony_default_parameters(
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_let(flags.Contains(kAllowHarmonySloppyLet));
parser->set_allow_harmony_destructuring_bind(
@@ -3687,9 +3684,7 @@ TEST(ErrorsArrowFormalParameters) {
nullptr
};
- static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters};
- RunParserSyncTest(context_data, assignment_expression_suffix_data, kError,
- NULL, 0, always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, assignment_expression_suffix_data, kError);
}
@@ -3881,7 +3876,6 @@ TEST(NoErrorsArrowFunctions) {
};
static const ParserFlag always_flags[] = {kAllowHarmonyDefaultParameters,
- kAllowHarmonyRestParameters,
kAllowHarmonyDestructuring};
RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
always_flags, arraysize(always_flags));
@@ -3988,7 +3982,6 @@ TEST(ArrowFunctionsYieldParameterNameInGenerator) {
};
static const ParserFlag always_flags[] = { kAllowHarmonyDestructuring,
- kAllowHarmonyRestParameters,
kAllowStrongMode};
RunParserSyncTest(sloppy_function_context_data, arrow_data, kSuccess, NULL, 0,
always_flags, arraysize(always_flags));
@@ -5315,9 +5308,7 @@ TEST(ParseRestParameters) {
"...\t\n\t\t\n args",
"a, ... \n \n args",
NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters};
- RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kSuccess);
}
@@ -5347,9 +5338,7 @@ TEST(ParseRestParametersErrors) {
"a,\ra, ...args",
"a,\na, ...args",
NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters};
- RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kError);
}
@@ -5364,8 +5353,7 @@ TEST(RestParameterInSetterMethodError) {
{nullptr, nullptr}};
const char* data[] = {"...a", "...arguments", "...eval", nullptr};
- static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters,
- kAllowHarmonySloppy};
+ static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
RunParserSyncTest(context_data, data, kError, nullptr, 0, always_flags,
arraysize(always_flags));
}
@@ -5388,15 +5376,11 @@ TEST(RestParametersEvalArguments) {
"arguments, ...args",
NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters};
-
// Fail in strict mode
- RunParserSyncTest(strict_context_data, data, kError, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(strict_context_data, data, kError);
// OK in sloppy mode
- RunParserSyncTest(sloppy_context_data, data, kSuccess, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(sloppy_context_data, data, kSuccess);
}
@@ -5415,12 +5399,9 @@ TEST(RestParametersDuplicateEvalArguments) {
"arguments, arguments, ...args",
NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters};
-
// In strict mode, the error is using "eval" or "arguments" as parameter names
// In sloppy mode, the error is that eval / arguments are duplicated
- RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kError);
}
@@ -6254,8 +6235,7 @@ TEST(StrongConstructorDirective) {
"foo() { \"use strong\" } constructor() {}", NULL};
static const ParserFlag always_flags[] = {
- kAllowHarmonyRestParameters, kAllowHarmonySloppy, kAllowHarmonySloppyLet,
- kAllowStrongMode};
+ kAllowHarmonySloppy, kAllowHarmonySloppyLet, kAllowStrongMode};
RunParserSyncTest(context_data, error_data, kError, NULL, 0, always_flags,
arraysize(always_flags));
@@ -7187,9 +7167,7 @@ TEST(DestructuringDisallowPatternsInSingleParamArrows) {
TEST(DestructuringDisallowPatternsInRestParams) {
i::FLAG_harmony_destructuring_bind = true;
- i::FLAG_harmony_rest_parameters = true;
- static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters,
- kAllowHarmonyDestructuring};
+ static const ParserFlag always_flags[] = {kAllowHarmonyDestructuring};
const char* context_data[][2] = {{"'use strict';", ""},
{"function outer() { 'use strict';", "}"},
{"", ""},
@@ -7551,7 +7529,7 @@ TEST(LanguageModeDirectivesNonSimpleParameterListErrors) {
static const ParserFlag always_flags[] = {
kAllowHarmonyDefaultParameters, kAllowHarmonyDestructuring,
- kAllowHarmonyRestParameters, kAllowHarmonySloppy, kAllowStrongMode};
+ kAllowHarmonySloppy, kAllowStrongMode};
RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
arraysize(always_flags));
}
« no previous file with comments | « test/cctest/compiler/test-run-jsobjects.cc ('k') | test/js-perf-test/JSTests.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698