Commit 720c531a authored by adamk's avatar adamk Committed by Commit bot

Remove --harmony-new-target flag

It was shipped in M46 without incident.

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

Cr-Commit-Position: refs/heads/master@{#31636}
parent a4689fc2
......@@ -2157,7 +2157,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_default_parameters)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_concat_spreadable)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexps)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps)
......@@ -2632,7 +2631,6 @@ bool Genesis::InstallExperimentalNatives() {
"native harmony-object-observe.js", nullptr};
static const char* harmony_sharedarraybuffer_natives[] = {
"native harmony-sharedarraybuffer.js", "native harmony-atomics.js", NULL};
static const char* harmony_new_target_natives[] = {nullptr};
static const char* harmony_concat_spreadable_natives[] = {
"native harmony-concat-spreadable.js", nullptr};
static const char* harmony_simd_natives[] = {"native harmony-simd.js",
......
......@@ -213,7 +213,6 @@ DEFINE_NEG_IMPLICATION(es_staging, legacy_const)
// Features that are shipping (turned on by default, but internal flag remains).
#define HARMONY_SHIPPING(V) \
V(harmony_array_includes, "harmony Array.prototype.includes") \
V(harmony_new_target, "harmony new.target") \
V(harmony_object_observe, "harmony Object.observe") \
V(harmony_rest_parameters, "harmony rest parameters") \
V(harmony_concat_spreadable, "harmony isConcatSpreadable") \
......
......@@ -921,7 +921,6 @@ Parser::Parser(ParseInfo* info)
set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters);
set_allow_harmony_default_parameters(FLAG_harmony_default_parameters);
set_allow_harmony_destructuring(FLAG_harmony_destructuring);
set_allow_harmony_new_target(FLAG_harmony_new_target);
set_allow_strong_mode(FLAG_strong_mode);
set_allow_legacy_const(FLAG_legacy_const);
set_allow_harmony_do_expressions(FLAG_harmony_do_expressions);
......@@ -4811,7 +4810,6 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
SET_ALLOW(harmony_rest_parameters);
SET_ALLOW(harmony_default_parameters);
SET_ALLOW(harmony_destructuring);
SET_ALLOW(harmony_new_target);
SET_ALLOW(strong_mode);
SET_ALLOW(harmony_do_expressions);
#undef SET_ALLOW
......
......@@ -114,7 +114,6 @@ class ParserBase : public Traits {
allow_harmony_rest_parameters_(false),
allow_harmony_default_parameters_(false),
allow_harmony_destructuring_(false),
allow_harmony_new_target_(false),
allow_strong_mode_(false),
allow_legacy_const_(true),
allow_harmony_do_expressions_(false) {}
......@@ -131,7 +130,6 @@ class ParserBase : public Traits {
ALLOW_ACCESSORS(harmony_rest_parameters);
ALLOW_ACCESSORS(harmony_default_parameters);
ALLOW_ACCESSORS(harmony_destructuring);
ALLOW_ACCESSORS(harmony_new_target);
ALLOW_ACCESSORS(strong_mode);
ALLOW_ACCESSORS(legacy_const);
ALLOW_ACCESSORS(harmony_do_expressions);
......@@ -838,7 +836,6 @@ class ParserBase : public Traits {
bool allow_harmony_rest_parameters_;
bool allow_harmony_default_parameters_;
bool allow_harmony_destructuring_;
bool allow_harmony_new_target_;
bool allow_strong_mode_;
bool allow_legacy_const_;
bool allow_harmony_do_expressions_;
......@@ -3401,7 +3398,7 @@ ParserBase<Traits>::ParseMemberWithNewPrefixesExpression(
if (peek() == Token::SUPER) {
const bool is_new = true;
result = ParseSuperExpression(is_new, classifier, CHECK_OK);
} else if (allow_harmony_new_target() && peek() == Token::PERIOD) {
} else if (peek() == Token::PERIOD) {
return ParseNewTargetExpression(CHECK_OK);
} else {
result = this->ParseMemberWithNewPrefixesExpression(classifier, CHECK_OK);
......
......@@ -324,7 +324,6 @@ bool Scope::Analyze(ParseInfo* info) {
void Scope::Initialize() {
bool subclass_constructor = IsSubclassConstructor(function_kind_);
DCHECK(!already_resolved());
// Add this scope as a new inner scope of the outer scope.
......@@ -337,6 +336,7 @@ void Scope::Initialize() {
// Declare convenience variables and the receiver.
if (is_declaration_scope() && has_this_declaration()) {
bool subclass_constructor = IsSubclassConstructor(function_kind_);
Variable* var = variables_.Declare(
this, ast_value_factory_->this_string(),
subclass_constructor ? CONST : VAR, Variable::THIS,
......@@ -351,10 +351,8 @@ void Scope::Initialize() {
variables_.Declare(this, ast_value_factory_->arguments_string(), VAR,
Variable::ARGUMENTS, kCreatedInitialized);
if (subclass_constructor || FLAG_harmony_new_target) {
variables_.Declare(this, ast_value_factory_->new_target_string(), CONST,
Variable::NORMAL, kCreatedInitialized);
}
variables_.Declare(this, ast_value_factory_->new_target_string(), CONST,
Variable::NORMAL, kCreatedInitialized);
if (IsConciseMethod(function_kind_) || IsClassConstructor(function_kind_) ||
IsAccessorFunction(function_kind_)) {
......
......@@ -1524,7 +1524,6 @@ void SetParserFlags(i::ParserBase<Traits>* parser,
parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet));
parser->set_allow_harmony_destructuring(
flags.Contains(kAllowHarmonyDestructuring));
parser->set_allow_harmony_new_target(flags.Contains(kAllowHarmonyNewTarget));
parser->set_allow_strong_mode(flags.Contains(kAllowStrongMode));
parser->set_allow_legacy_const(!flags.Contains(kNoLegacyConst));
}
......
// 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-new-target
function f() { new.target = 5 }
*%(basename)s:7: ReferenceError: Invalid left-hand side in assignment
*%(basename)s:5: ReferenceError: Invalid left-hand side in assignment
function f() { new.target = 5 }
^^^^^^^^^^
ReferenceError: Invalid left-hand side in assignment
// 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-new-target
function f() { for (new.target in {}); }
*%(basename)s:7: SyntaxError: Invalid left-hand side in for-loop
*%(basename)s:5: SyntaxError: Invalid left-hand side in for-loop
function f() { for (new.target in {}); }
^^^^^^^^^^
SyntaxError: Invalid left-hand side in for-loop
// 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-new-target
function f() { new.target++ }
*%(basename)s:7: ReferenceError: Invalid left-hand side expression in postfix operation
*%(basename)s:5: ReferenceError: Invalid left-hand side expression in postfix operation
function f() { new.target++ }
^^^^^^^^^^
ReferenceError: Invalid left-hand side expression in postfix operation
// 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-new-target
function f() { ++new.target }
*%(basename)s:7: ReferenceError: Invalid left-hand side expression in prefix operation
*%(basename)s:5: ReferenceError: Invalid left-hand side expression in prefix operation
function f() { ++new.target }
^^^^^^^^^^
ReferenceError: Invalid left-hand side expression in prefix operation
......@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-new-target --harmony-reflect --harmony-destructuring
// Flags: --harmony-rest-parameters
// Flags: --harmony-reflect --harmony-destructuring --harmony-rest-parameters
(function TestClass() {
......
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