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)); |
} |