Remove --harmony-arrow-functions flag
authoradamk <adamk@chromium.org>
Wed, 30 Sep 2015 19:49:46 +0000 (12:49 -0700)
committerJongsoo Yoon <join.yoon@samsung.com>
Fri, 20 Nov 2015 13:32:16 +0000 (22:32 +0900)
Arrow functions have been enabled by default since the 4.5 branch.

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

Cr-Commit-Position: refs/heads/master@{#31031}

48 files changed:
src/bootstrapper.cc
src/flag-definitions.h
src/parser.cc
src/preparser.h
test/cctest/test-asm-validator.cc
test/cctest/test-ast-expression-visitor.cc
test/cctest/test-parsing.cc
test/cctest/test-typing-reset.cc
test/message/arrow-bare-rest-param.js
test/message/arrow-formal-parameters.js
test/message/arrow-formal-parameters.out
test/message/arrow-missing.js
test/message/arrow-param-after-rest-2.js
test/message/arrow-param-after-rest.js
test/message/arrow-strict-eval-bare-parameter.js
test/message/arrow-strict-eval-bare-parameter.out
test/message/arrow-two-rest-params.js
test/message/invalid-spread-2.js
test/message/invalid-spread.js
test/mjsunit/es6/arrow-functions-lexical-arguments.js [moved from test/mjsunit/harmony/arrow-functions-lexical-arguments.js with 98% similarity]
test/mjsunit/es6/arrow-functions-this.js [moved from test/mjsunit/harmony/arrow-functions-this.js with 98% similarity]
test/mjsunit/es6/arrow-functions.js [moved from test/mjsunit/harmony/arrow-functions.js with 98% similarity]
test/mjsunit/es6/object-literals-super.js [moved from test/mjsunit/harmony/object-literals-super.js with 98% similarity]
test/mjsunit/es6/regress/regress-3501.js [moved from test/mjsunit/harmony/regress/regress-3501.js with 88% similarity]
test/mjsunit/es6/regress/regress-4056.js [moved from test/mjsunit/harmony/regress/regress-4056.js with 89% similarity]
test/mjsunit/es6/regress/regress-4160.js [moved from test/mjsunit/harmony/regress/regress-4160.js with 92% similarity]
test/mjsunit/es6/regress/regress-arrow-duplicate-params.js [moved from test/mjsunit/harmony/regress/regress-arrow-duplicate-params.js with 85% similarity]
test/mjsunit/es6/regress/regress-crbug-465671-null.js [moved from test/mjsunit/harmony/regress/regress-crbug-465671-null.js with 90% similarity]
test/mjsunit/es6/regress/regress-crbug-465671.js [moved from test/mjsunit/harmony/regress/regress-crbug-465671.js with 90% similarity]
test/mjsunit/harmony/arrow-rest-params-lazy-parsing.js
test/mjsunit/harmony/arrow-rest-params.js
test/mjsunit/harmony/default-parameters.js
test/mjsunit/harmony/destructuring-parameters-literalcount-nolazy.js
test/mjsunit/harmony/destructuring-parameters-literalcount.js
test/mjsunit/harmony/destructuring.js
test/mjsunit/harmony/new-target.js
test/mjsunit/harmony/regress/regress-4211.js
test/mjsunit/harmony/regress/regress-508074.js
test/mjsunit/harmony/rest-params-lazy-parsing.js
test/mjsunit/harmony/super.js
test/mjsunit/strong/classes.js
test/mjsunit/strong/declaration-after-use.js
test/mjsunit/strong/destructuring.js
test/mjsunit/strong/function-arity.js
test/mjsunit/strong/literals.js
test/mjsunit/strong/mutually-recursive-classes.js
test/mjsunit/strong/undefined.js
test/mjsunit/this-dynamic-lookup.js

index 4a3bb2c..a7754db 100644 (file)
@@ -1854,7 +1854,6 @@ void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate,
 
 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules)
 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes)
-EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_function)
@@ -2554,7 +2553,6 @@ bool Genesis::InstallExperimentalNatives() {
   static const char* harmony_modules_natives[] = {nullptr};
   static const char* harmony_regexps_natives[] = {"native harmony-regexp.js",
                                                   nullptr};
-  static const char* harmony_arrow_functions_natives[] = {nullptr};
   static const char* harmony_tostring_natives[] = {"native harmony-tostring.js",
                                                    nullptr};
   static const char* harmony_sloppy_natives[] = {nullptr};
index e9e1363..e4e99c3 100644 (file)
@@ -210,7 +210,6 @@ DEFINE_BOOL(legacy_const, true, "legacy semantics for const in sloppy mode")
 
 // Features that are shipping (turned on by default, but internal flag remains).
 #define HARMONY_SHIPPING(V)                                     \
-  V(harmony_arrow_functions, "harmony arrow functions")         \
   V(harmony_array_includes, "harmony Array.prototype.includes") \
   V(harmony_new_target, "harmony new.target")                   \
   V(harmony_object_observe, "harmony Object.observe")           \
index 1bd163c..534a138 100644 (file)
@@ -913,7 +913,6 @@ Parser::Parser(ParseInfo* info)
   DCHECK(!info->script().is_null() || info->source_stream() != NULL);
   set_allow_lazy(info->allow_lazy_parsing());
   set_allow_natives(FLAG_allow_natives_syntax || info->is_native());
-  set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions);
   set_allow_harmony_sloppy(FLAG_harmony_sloppy);
   set_allow_harmony_sloppy_function(FLAG_harmony_sloppy_function);
   set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let);
@@ -4732,7 +4731,6 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
     reusable_preparser_->set_allow_lazy(true);
 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name());
     SET_ALLOW(natives);
-    SET_ALLOW(harmony_arrow_functions);
     SET_ALLOW(harmony_sloppy);
     SET_ALLOW(harmony_sloppy_let);
     SET_ALLOW(harmony_rest_parameters);
index 3739447..45a7721 100644 (file)
@@ -107,7 +107,6 @@ class ParserBase : public Traits {
         stack_overflow_(false),
         allow_lazy_(false),
         allow_natives_(false),
-        allow_harmony_arrow_functions_(false),
         allow_harmony_sloppy_(false),
         allow_harmony_sloppy_function_(false),
         allow_harmony_sloppy_let_(false),
@@ -126,7 +125,6 @@ class ParserBase : public Traits {
 
   ALLOW_ACCESSORS(lazy);
   ALLOW_ACCESSORS(natives);
-  ALLOW_ACCESSORS(harmony_arrow_functions);
   ALLOW_ACCESSORS(harmony_sloppy);
   ALLOW_ACCESSORS(harmony_sloppy_function);
   ALLOW_ACCESSORS(harmony_sloppy_let);
@@ -827,7 +825,6 @@ class ParserBase : public Traits {
 
   bool allow_lazy_;
   bool allow_natives_;
-  bool allow_harmony_arrow_functions_;
   bool allow_harmony_sloppy_;
   bool allow_harmony_sloppy_function_;
   bool allow_harmony_sloppy_let_;
@@ -2915,7 +2912,7 @@ ParserBase<Traits>::ParseAssignmentExpression(bool accept_IN,
   }
   ExpressionT expression = this->ParseConditionalExpression(
       accept_IN, &arrow_formals_classifier, CHECK_OK);
-  if (allow_harmony_arrow_functions() && peek() == Token::ARROW) {
+  if (peek() == Token::ARROW) {
     BindingPatternUnexpectedToken(classifier);
     ValidateArrowFormalParameters(&arrow_formals_classifier, expression,
                                   parenthesized_formals, CHECK_OK);
index 7b45a67..c5bf5e5 100644 (file)
@@ -55,7 +55,6 @@ std::string Validate(Zone* zone, const char* source,
 
   i::ParseInfo info(zone, script);
   i::Parser parser(&info);
-  parser.set_allow_harmony_arrow_functions(true);
   parser.set_allow_harmony_sloppy(true);
   info.set_global();
   info.set_lazy(false);
index 5cef440..0f94ae6 100644 (file)
@@ -31,7 +31,6 @@ static void CollectTypes(HandleAndZoneScope* handles, const char* source,
 
   i::ParseInfo info(handles->main_zone(), script);
   i::Parser parser(&info);
-  parser.set_allow_harmony_arrow_functions(true);
   parser.set_allow_harmony_sloppy(true);
   info.set_global();
   info.set_lazy(false);
index 6300c09..fd447a8 100644 (file)
@@ -227,7 +227,6 @@ TEST(UsingCachedData) {
   // ScriptResource will be deleted when the corresponding String is GCd.
   v8::ScriptCompiler::Source script_source(v8::String::NewExternal(
       isolate, new ScriptResource(source, source_length)));
-  i::FLAG_harmony_arrow_functions = true;
   i::FLAG_min_preparse_length = 0;
   v8::ScriptCompiler::Compile(isolate, &script_source,
                               v8::ScriptCompiler::kProduceParserCache);
@@ -251,7 +250,6 @@ TEST(PreparseFunctionDataIsUsed) {
 
   // Make preparsing work for short scripts.
   i::FLAG_min_preparse_length = 0;
-  i::FLAG_harmony_arrow_functions = true;
 
   v8::Isolate* isolate = CcTest::isolate();
   v8::HandleScope handles(isolate);
@@ -330,7 +328,6 @@ TEST(StandAlonePreParser) {
                            stack_limit);
     preparser.set_allow_lazy(true);
     preparser.set_allow_natives(true);
-    preparser.set_allow_harmony_arrow_functions(true);
     i::PreParser::PreParseResult result = preparser.PreParseProgram();
     CHECK_EQ(i::PreParser::kPreParseSuccess, result);
     CHECK(!log.HasError());
@@ -524,7 +521,6 @@ TEST(PreParseOverflow) {
   i::PreParser preparser(&zone, &scanner, &ast_value_factory, &log,
                          stack_limit);
   preparser.set_allow_lazy(true);
-  preparser.set_allow_harmony_arrow_functions(true);
   i::PreParser::PreParseResult result = preparser.PreParseProgram();
   CHECK_EQ(i::PreParser::kPreParseStackOverflow, result);
 }
@@ -1064,7 +1060,6 @@ TEST(ScopeUsesArgumentsSuperThis) {
       i::Zone zone;
       i::ParseInfo info(&zone, script);
       i::Parser parser(&info);
-      parser.set_allow_harmony_arrow_functions(true);
       parser.set_allow_harmony_sloppy(true);
       info.set_global();
       CHECK(parser.Parse(&info));
@@ -1118,7 +1113,6 @@ static void CheckParsesToNumber(const char* source, bool with_dot) {
 
   i::ParseInfo info(handles.main_zone(), script);
   i::Parser parser(&info);
-  parser.set_allow_harmony_arrow_functions(true);
   parser.set_allow_harmony_sloppy(true);
   info.set_global();
   info.set_lazy(false);
@@ -1375,7 +1369,6 @@ TEST(ScopePositions) {
     i::ParseInfo info(&zone, script);
     i::Parser parser(&info);
     parser.set_allow_lazy(true);
-    parser.set_allow_harmony_arrow_functions(true);
     info.set_global();
     info.set_language_mode(source_data[i].language_mode);
     parser.Parse(&info);
@@ -1497,7 +1490,6 @@ i::Handle<i::String> FormatMessage(i::Vector<unsigned> data) {
 enum ParserFlag {
   kAllowLazy,
   kAllowNatives,
-  kAllowHarmonyArrowFunctions,
   kAllowHarmonyDefaultParameters,
   kAllowHarmonyRestParameters,
   kAllowHarmonySloppy,
@@ -1522,8 +1514,6 @@ void SetParserFlags(i::ParserBase<Traits>* parser,
                     i::EnumSet<ParserFlag> flags) {
   parser->set_allow_lazy(flags.Contains(kAllowLazy));
   parser->set_allow_natives(flags.Contains(kAllowNatives));
-  parser->set_allow_harmony_arrow_functions(
-      flags.Contains(kAllowHarmonyArrowFunctions));
   parser->set_allow_harmony_default_parameters(
       flags.Contains(kAllowHarmonyDefaultParameters));
   parser->set_allow_harmony_rest_parameters(
@@ -2006,9 +1996,7 @@ TEST(NoErrorsEvalAndArgumentsStrict) {
     NULL
   };
 
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions};
-  RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
-                    always_flags, arraysize(always_flags));
+  RunParserSyncTest(context_data, statement_data, kSuccess);
 }
 
 
@@ -2087,13 +2075,7 @@ TEST(NoErrorsFutureStrictReservedWords) {
     NULL
   };
 
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions};
-  RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
-                    always_flags, arraysize(always_flags));
-
-  static const ParserFlag classes_flags[] = {kAllowHarmonyArrowFunctions};
-  RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
-                    classes_flags, arraysize(classes_flags));
+  RunParserSyncTest(context_data, statement_data, kSuccess);
 }
 
 
@@ -2520,9 +2502,7 @@ TEST(NoErrorsIllegalWordsAsLabels) {
     NULL
   };
 
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions};
-  RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
-                    always_flags, arraysize(always_flags));
+  RunParserSyncTest(context_data, statement_data, kSuccess);
 }
 
 
@@ -2541,9 +2521,7 @@ TEST(NoErrorsFutureStrictReservedAsLabelsSloppy) {
   };
 #undef LABELLED_WHILE
 
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions};
-  RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
-                    always_flags, arraysize(always_flags));
+  RunParserSyncTest(context_data, statement_data, kSuccess);
 }
 
 
@@ -3618,8 +3596,7 @@ TEST(ErrorsArrowFormalParameters) {
     nullptr
   };
 
-  static const ParserFlag always_flags[] = { kAllowHarmonyArrowFunctions,
-                                             kAllowHarmonyRestParameters };
+  static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters};
   RunParserSyncTest(context_data, assignment_expression_suffix_data, kError,
                     NULL, 0, always_flags, arraysize(always_flags));
 }
@@ -3733,9 +3710,8 @@ TEST(ErrorsArrowFunctions) {
 
   // The test is quite slow, so run it with a reduced set of flags.
   static const ParserFlag flags[] = {kAllowLazy};
-  static const ParserFlag always_flags[] = { kAllowHarmonyArrowFunctions };
   RunParserSyncTest(context_data, statement_data, kError, flags,
-                    arraysize(flags), always_flags, arraysize(always_flags));
+                    arraysize(flags));
 }
 
 
@@ -3805,9 +3781,9 @@ TEST(NoErrorsArrowFunctions) {
     NULL
   };
 
-  static const ParserFlag always_flags[] = {
-      kAllowHarmonyArrowFunctions, kAllowHarmonyDefaultParameters,
-      kAllowHarmonyRestParameters, kAllowHarmonyDestructuring};
+  static const ParserFlag always_flags[] = {kAllowHarmonyDefaultParameters,
+                                            kAllowHarmonyRestParameters,
+                                            kAllowHarmonyDestructuring};
   RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
                     always_flags, arraysize(always_flags));
 }
@@ -3862,8 +3838,7 @@ TEST(ArrowFunctionsSloppyParameterNames) {
     NULL
   };
 
-  static const ParserFlag always_flags[] = { kAllowHarmonyArrowFunctions,
-                                             kAllowStrongMode};
+  static const ParserFlag always_flags[] = {kAllowStrongMode};
   RunParserSyncTest(strong_context_data, statement_data, kError, NULL, 0,
                     always_flags, arraysize(always_flags));
   RunParserSyncTest(strict_context_data, statement_data, kError, NULL, 0,
@@ -3906,7 +3881,6 @@ TEST(ArrowFunctionsYieldParameterNameInGenerator) {
 
   static const ParserFlag always_flags[] = { kAllowHarmonyDestructuring,
                                              kAllowHarmonyRestParameters,
-                                             kAllowHarmonyArrowFunctions,
                                              kAllowStrongMode};
   RunParserSyncTest(sloppy_function_context_data, arrow_data, kSuccess, NULL, 0,
                     always_flags, arraysize(always_flags));
@@ -3939,7 +3913,6 @@ TEST(SuperNoErrors) {
   };
 
   static const ParserFlag always_flags[] = {
-    kAllowHarmonyArrowFunctions,
     kAllowHarmonySloppy
   };
   RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
@@ -3986,8 +3959,7 @@ TEST(SuperCall) {
     NULL
   };
 
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
-                                            kAllowHarmonySloppy};
+  static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
   RunParserSyncTest(context_data, success_data, kSuccess, NULL, 0,
                     always_flags, arraysize(always_flags));
 
@@ -4037,8 +4009,7 @@ TEST(SuperNewNoErrors) {
     NULL
   };
 
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
-                                            kAllowHarmonySloppy};
+  static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
   RunParserSyncTest(context_data, expression_data, kSuccess, NULL, 0,
                     always_flags, arraysize(always_flags));
 }
@@ -4071,8 +4042,7 @@ TEST(SuperNewErrors) {
     NULL
   };
 
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
-                                            kAllowHarmonySloppy};
+  static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
   RunParserSyncTest(context_data, statement_data, kError, NULL, 0,
                     always_flags, arraysize(always_flags));
 }
@@ -6053,8 +6023,7 @@ TEST(StrongConstructorThis) {
       "class C { constructor() { label: 0; this.a = 0; this.b = 6; } }",
       NULL};
 
-  static const ParserFlag always_flags[] = {kAllowStrongMode,
-                                            kAllowHarmonyArrowFunctions};
+  static const ParserFlag always_flags[] = {kAllowStrongMode};
   RunParserSyncTest(sloppy_context_data, error_data, kError, NULL, 0,
                     always_flags, arraysize(always_flags));
   RunParserSyncTest(strict_context_data, error_data, kSuccess, NULL, 0,
@@ -6107,8 +6076,7 @@ TEST(StrongConstructorSuper) {
       "class C extends Object { constructor() { 3; super(3); this.x = 0; } }",
       NULL};
 
-  static const ParserFlag always_flags[] = {kAllowStrongMode,
-                                            kAllowHarmonyArrowFunctions};
+  static const ParserFlag always_flags[] = {kAllowStrongMode};
   RunParserSyncTest(sloppy_context_data, error_data, kError, NULL, 0,
                     always_flags, arraysize(always_flags));
   RunParserSyncTest(strict_context_data, error_data, kSuccess, NULL, 0,
@@ -6249,9 +6217,7 @@ TEST(StrongUndefinedArrow) {
       "((a, b, undefined) => {'use strong';});",
       NULL};
 
-  static const ParserFlag always_flags[] = {
-      kAllowStrongMode, kAllowHarmonyArrowFunctions
-  };
+  static const ParserFlag always_flags[] = {kAllowStrongMode};
   RunParserSyncTest(sloppy_context_data, data, kSuccess, NULL, 0, always_flags,
                     arraysize(always_flags));
   RunParserSyncTest(strict_context_data, data, kSuccess, NULL, 0, always_flags,
@@ -6367,9 +6333,7 @@ TEST(ArrowFunctionASIErrors) {
       "((a, b)\n=> a + b)(1, 2)",
       "((a, b)/*\n*/=> a + b)(1, 2)",
       NULL};
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions};
-  RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
-                    arraysize(always_flags));
+  RunParserSyncTest(context_data, data, kError);
 }
 
 
@@ -6525,7 +6489,6 @@ TEST(StrongModeFreeVariablesNotDeclared) {
 
 TEST(DestructuringPositiveTests) {
   i::FLAG_harmony_destructuring = true;
-  i::FLAG_harmony_arrow_functions = true;
 
   const char* context_data[][2] = {{"'use strict'; let ", " = {};"},
                                    {"var ", " = {};"},
@@ -6576,8 +6539,7 @@ TEST(DestructuringPositiveTests) {
     "[a,,...rest]",
     NULL};
   // clang-format on
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
-                                            kAllowHarmonyDestructuring};
+  static const ParserFlag always_flags[] = {kAllowHarmonyDestructuring};
   RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
                     arraysize(always_flags));
 }
@@ -6585,9 +6547,7 @@ TEST(DestructuringPositiveTests) {
 
 TEST(DestructuringNegativeTests) {
   i::FLAG_harmony_destructuring = true;
-  i::FLAG_harmony_arrow_functions = true;
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
-                                            kAllowHarmonyDestructuring};
+  static const ParserFlag always_flags[] = {kAllowHarmonyDestructuring};
 
   {  // All modes.
     const char* context_data[][2] = {{"'use strict'; let ", " = {};"},
@@ -6754,9 +6714,7 @@ TEST(DestructuringDisallowPatternsInForVarIn) {
 
 TEST(DestructuringDuplicateParams) {
   i::FLAG_harmony_destructuring = true;
-  i::FLAG_harmony_arrow_functions = true;
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
-                                            kAllowHarmonyDestructuring};
+  static const ParserFlag always_flags[] = {kAllowHarmonyDestructuring};
   const char* context_data[][2] = {{"'use strict';", ""},
                                    {"function outer() { 'use strict';", "}"},
                                    {nullptr, nullptr}};
@@ -6782,9 +6740,7 @@ TEST(DestructuringDuplicateParams) {
 
 TEST(DestructuringDuplicateParamsSloppy) {
   i::FLAG_harmony_destructuring = true;
-  i::FLAG_harmony_arrow_functions = true;
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
-                                            kAllowHarmonyDestructuring};
+  static const ParserFlag always_flags[] = {kAllowHarmonyDestructuring};
   const char* context_data[][2] = {
       {"", ""}, {"function outer() {", "}"}, {nullptr, nullptr}};
 
@@ -6805,9 +6761,7 @@ TEST(DestructuringDuplicateParamsSloppy) {
 
 TEST(DestructuringDisallowPatternsInSingleParamArrows) {
   i::FLAG_harmony_destructuring = true;
-  i::FLAG_harmony_arrow_functions = true;
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
-                                            kAllowHarmonyDestructuring};
+  static const ParserFlag always_flags[] = {kAllowHarmonyDestructuring};
   const char* context_data[][2] = {{"'use strict';", ""},
                                    {"function outer() { 'use strict';", "}"},
                                    {"", ""},
@@ -6827,10 +6781,8 @@ TEST(DestructuringDisallowPatternsInSingleParamArrows) {
 
 TEST(DestructuringDisallowPatternsInRestParams) {
   i::FLAG_harmony_destructuring = true;
-  i::FLAG_harmony_arrow_functions = true;
   i::FLAG_harmony_rest_parameters = true;
-  static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
-                                            kAllowHarmonyRestParameters,
+  static const ParserFlag always_flags[] = {kAllowHarmonyRestParameters,
                                             kAllowHarmonyDestructuring};
   const char* context_data[][2] = {{"'use strict';", ""},
                                    {"function outer() { 'use strict';", "}"},
@@ -6919,9 +6871,9 @@ TEST(DefaultParametersYieldInInitializers) {
   };
 
   // clang-format on
-  static const ParserFlag always_flags[] = {
-      kAllowHarmonyDestructuring, kAllowHarmonyDefaultParameters,
-      kAllowHarmonyArrowFunctions, kAllowStrongMode};
+  static const ParserFlag always_flags[] = {kAllowHarmonyDestructuring,
+                                            kAllowHarmonyDefaultParameters,
+                                            kAllowStrongMode};
 
   RunParserSyncTest(sloppy_function_context_data, parameter_data, kSuccess,
                     NULL, 0, always_flags, arraysize(always_flags));
@@ -7036,7 +6988,6 @@ TEST(NewTarget) {
   };
 
   static const ParserFlag always_flags[] = {
-    kAllowHarmonyArrowFunctions,
     kAllowHarmonyNewTarget,
     kAllowHarmonySloppy,
   };
@@ -7202,10 +7153,8 @@ TEST(LanguageModeDirectivesNonSimpleParameterListErrors) {
       NULL};
 
   static const ParserFlag always_flags[] = {
-      kAllowHarmonyArrowFunctions, kAllowHarmonyDefaultParameters,
-      kAllowHarmonyDestructuring, kAllowHarmonyRestParameters,
-      kAllowHarmonySloppy, kAllowStrongMode
-  };
+      kAllowHarmonyDefaultParameters, kAllowHarmonyDestructuring,
+      kAllowHarmonyRestParameters, kAllowHarmonySloppy, kAllowStrongMode};
   RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
                     arraysize(always_flags));
 }
index 1a5fc82..1953933 100644 (file)
@@ -274,7 +274,6 @@ TEST(ResetTypingInfo) {
 
   i::ParseInfo info(handles.main_zone(), script);
   i::Parser parser(&info);
-  parser.set_allow_harmony_arrow_functions(true);
   parser.set_allow_harmony_sloppy(true);
   info.set_global();
   info.set_lazy(false);
index 9b3916d..bd5761f 100644 (file)
@@ -2,6 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Flags: --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --harmony-rest-parameters
 
 ...x => 10
index edc0c58..30f9c86 100644 (file)
@@ -2,6 +2,4 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions
-
 (b, a, a, d) => a
index ee91849..bafcf45 100644 (file)
@@ -1,4 +1,4 @@
-*%(basename)s:7: SyntaxError: Duplicate parameter name not allowed in this context
+*%(basename)s:5: SyntaxError: Duplicate parameter name not allowed in this context
 (b, a, a, d) => a
            ^
 SyntaxError: Duplicate parameter name not allowed in this context
index 566345a..c78bef9 100644 (file)
@@ -2,6 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Flags: --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --harmony-rest-parameters
 
 function foo() { return(); }
index 3b42f19..c01cec8 100644 (file)
@@ -2,6 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Flags: --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --harmony-rest-parameters
 
 (w, ...x, y) => 10
index 0fade6c..3284606 100644 (file)
@@ -2,6 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Flags: --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --harmony-rest-parameters
 
 (...x, y) => 10
index d569251..3cc8254 100644 (file)
@@ -1,8 +1,6 @@
 // Copyright 2015 the V8 project authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-//
-// Flags: --harmony-arrow-functions
 
 "use strict";
 eval => 42
index 0eb8f88..e2230a1 100644 (file)
@@ -1,4 +1,4 @@
-*%(basename)s:8: SyntaxError: Unexpected eval or arguments in strict mode
+*%(basename)s:6: SyntaxError: Unexpected eval or arguments in strict mode
 eval => 42
 ^^^^
 SyntaxError: Unexpected eval or arguments in strict mode
index 345545c..44eb47e 100644 (file)
@@ -2,6 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Flags: --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --harmony-rest-parameters
 
 (w, ...x, ...y) => 10
index 67e0f7d..60635fe 100644 (file)
@@ -2,6 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Flags: --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --harmony-rest-parameters
 
 (x, ...y, z)
index e58334e..bf051fe 100644 (file)
@@ -2,6 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Flags: --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --harmony-rest-parameters
 
 (x, ...y)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions
-
 
 (function testInFunctionDeclaration() {
   var calls = 0;
similarity index 98%
rename from test/mjsunit/harmony/arrow-functions-this.js
rename to test/mjsunit/es6/arrow-functions-this.js
index 2c2ad07..dea105f 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions
-
 var object = {};
 var global = this;
 var call = Function.call.bind(Function.call);
similarity index 98%
rename from test/mjsunit/harmony/arrow-functions.js
rename to test/mjsunit/es6/arrow-functions.js
index 6b84c3a..33147ab 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions
-
 // Arrow functions are like functions, except they throw when using the
 // "new" operator on them.
 assertEquals("function", typeof (() => {}));
similarity index 98%
rename from test/mjsunit/harmony/object-literals-super.js
rename to test/mjsunit/es6/object-literals-super.js
index c6fb633..b31a498 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions --allow-natives-syntax
+// Flags: --allow-natives-syntax
 
 
 (function TestHomeObject() {
similarity index 88%
rename from test/mjsunit/harmony/regress/regress-3501.js
rename to test/mjsunit/es6/regress/regress-3501.js
index 4b449e4..82920e0 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions
-
 // See: http://code.google.com/p/v8/issues/detail?id=3501
 
 "use strict";
similarity index 89%
rename from test/mjsunit/harmony/regress/regress-4056.js
rename to test/mjsunit/es6/regress/regress-4056.js
index d938df0..f80aa9f 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions
-
 function strictFunctionArrowEval(s) {
   "use strict";
   return (()=>eval(s))();
similarity index 92%
rename from test/mjsunit/harmony/regress/regress-4160.js
rename to test/mjsunit/es6/regress/regress-4160.js
index b02daee..d5dd270 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions --allow-natives-syntax
+// Flags: --allow-natives-syntax
 
 (function(x) {
   (function(x) {
@@ -2,6 +2,4 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions
-
 assertThrows("(x, x, y) => 10;", SyntaxError);
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions
-
 // This used to trigger a segfault because of NULL being accessed.
 function f() {
   var a = [10];
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions
-
 // This used to trigger crash because of an unhandled stack overflow.
 function f() {
   var a = [10];
index 6e760fc..478603e 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --harmony-rest-parameters
 // Flags: --min-preparse-length=0
 
 (function testRestIndex() {
index 0ee7739..3cb7adf 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --harmony-rest-parameters
 
 (function testRestIndex() {
   assertEquals(5, ((...args) => args.length)(1,2,3,4,5));
index b3a79a4..cd9d26a 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-default-parameters --harmony-arrow-functions
+// Flags: --harmony-default-parameters
 // Flags: --harmony-rest-parameters --harmony-destructuring
 
 
index 52d7ca0..8215843 100644 (file)
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 //
 // Flags: --harmony-destructuring
-// Flags: --harmony-arrow-functions --no-lazy --allow-natives-syntax
+// Flags: --no-lazy --allow-natives-syntax
 
 
 var t1 = [1];
index 64c1793..cc0e278 100644 (file)
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 //
 // Flags: --harmony-destructuring
-// Flags: --harmony-arrow-functions --allow-natives-syntax
+// Flags: --allow-natives-syntax
 
 
 var t1 = [1];
index f1e2210..ebd3f9f 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Flags: --harmony-destructuring --harmony-arrow-functions
+// Flags: --harmony-destructuring
 // Flags: --harmony-default-parameters --harmony-rest-parameters
 
 (function TestObjectLiteralPattern() {
index d98f5f8..6e7cdcc 100644 (file)
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 // Flags: --harmony-new-target --harmony-reflect --harmony-destructuring
-// Flags: --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --harmony-rest-parameters
 
 
 (function TestClass() {
index 8affc73..d83c1a7 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Flags: --harmony-arrow-functions --harmony-rest-parameters
+// Flags: --harmony-rest-parameters
 
 assertThrows("()=>{}()", SyntaxError);
 assertThrows("x=>{}()", SyntaxError);
index d2864bb..93f82cf 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --harmony-rest-parameters
 // Flags: --allow-natives-syntax
 
 var f = (a, b, ...c) => {
index b50a990..2042a27 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --harmony-rest-parameters
 // Flags: --min-preparse-length=0
 
 function variadic(co, ...values) {
index d74484e..9242dd5 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions --allow-natives-syntax
+// Flags: --allow-natives-syntax
 // Flags: --harmony-spread-calls --harmony-destructuring
 // Flags: --harmony-rest-parameters --harmony-sloppy
 
index c8d2617..92dea0f 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --strong-mode --harmony-arrow-functions
+// Flags: --strong-mode
 
 'use strong';
 
index e6caccf..ee44983 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --strong-mode --harmony-rest-parameters --harmony-arrow-functions
+// Flags: --strong-mode --harmony-rest-parameters
 
 // Note that it's essential for these tests that the reference is inside dead
 // code (because we already produce ReferenceErrors for run-time unresolved
index 3145dcf..b3971b3 100644 (file)
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 //
 // Flags: --harmony-destructuring
-// Flags: --harmony-arrow-functions --strong-mode --allow-natives-syntax
+// Flags: --strong-mode --allow-natives-syntax
 
 (function() {
   var f = (function() {
index 67c0d1f..0dca49f 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --strong-mode --harmony-arrow-functions --harmony-reflect
+// Flags: --strong-mode --harmony-reflect
 // Flags: --harmony-spread-calls --harmony-rest-parameters --allow-natives-syntax
 
 'use strict';
index a78f793..89657be 100644 (file)
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 // Flags: --strong-mode --allow-natives-syntax
-// Flags: --harmony-arrow-functions --harmony-rest-parameters
+// Flags: --harmony-rest-parameters
 // Flags: --harmony-destructuring --harmony-spread-arrays
 
 'use strict';
index c8cf978..204c396 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --strong-mode --harmony-arrow-functions
+// Flags: --strong-mode
 "use strict"
 
 let prologue_dead = "(function outer() { if (false) { ";
index f324106..218547a 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --strong-mode --harmony-sloppy --harmony-arrow-functions
+// Flags: --strong-mode --harmony-sloppy
 
 // Repurposing the strict mode 'eval' and 'arguments' tests to test for correct
 // behaviour of 'undefined' as an identifier in strong mode.
index c5fa7a2..eedda60 100644 (file)
@@ -2,7 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-arrow-functions
 // NO HARNESS
 
 var globalEval = eval;