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);
......
This diff is collapsed.
......@@ -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