Commit 163419e8 authored by adamk's avatar adamk Committed by Commit bot

Remove --harmony-arrow-functions flag

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}
parent 51d28914
......@@ -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};
......
......@@ -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") \
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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));
}
......
......@@ -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);
......
......@@ -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
......@@ -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
*%(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
......@@ -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(); }
......@@ -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
......@@ -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
// 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
*%(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
......@@ -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
......@@ -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)
......@@ -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;
......
......@@ -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);
......
......@@ -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 (() => {}));
......
......@@ -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() {
......
......@@ -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";
......
......@@ -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))();
......
......@@ -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];
......
......@@ -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() {
......
......@@ -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));
......
......@@ -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
......
......@@ -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];
......
......@@ -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];
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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);
......
......@@ -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) => {
......
......@@ -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) {
......
......@@ -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
......
......@@ -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';
......
......@@ -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
......
......@@ -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() {
......
......@@ -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';
......
......@@ -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';
......
......@@ -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) { ";
......
......@@ -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.
......
......@@ -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;
......
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