Commit 47dd45c0 authored by arv's avatar arv Committed by Commit bot

[es6] Remove harmony-object-literal flag

And move tests to es6 directory

BUG=v8:3516
LOG=N
R=adamk@chromium.org, rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29334}
parent 3a1ef020
......@@ -1801,7 +1801,6 @@ EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_modules)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrays)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_array_includes)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring)
......@@ -1839,7 +1838,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
......@@ -2475,7 +2473,6 @@ bool Genesis::InstallExperimentalNatives() {
static const char* harmony_proxies_natives[] = {"native proxy.js", nullptr};
static const char* harmony_classes_natives[] = {nullptr};
static const char* harmony_modules_natives[] = {nullptr};
static const char* harmony_object_literals_natives[] = {nullptr};
static const char* harmony_regexps_natives[] = {"native harmony-regexp.js",
nullptr};
static const char* harmony_arrow_functions_natives[] = {nullptr};
......
......@@ -201,16 +201,15 @@ DEFINE_IMPLICATION(es_staging, harmony)
V(harmony_tostring, "harmony toString")
// Features that are shipping (turned on by default, but internal flag remains).
#define HARMONY_SHIPPING(V) \
V(harmony_arrays, "harmony array methods") \
V(harmony_arrow_functions, "harmony arrow functions") \
V(harmony_classes, "harmony classes (implies object literal extension)") \
V(harmony_computed_property_names, "harmony computed property names") \
V(harmony_object_literals, "harmony object literal extensions") \
V(harmony_spreadcalls, "harmony spread-calls") \
V(harmony_spread_arrays, "harmony spread in array literals") \
V(harmony_unicode, "harmony unicode escapes") \
V(harmony_object, "harmony Object methods") \
#define HARMONY_SHIPPING(V) \
V(harmony_arrays, "harmony array methods") \
V(harmony_arrow_functions, "harmony arrow functions") \
V(harmony_classes, "harmony classes") \
V(harmony_computed_property_names, "harmony computed property names") \
V(harmony_spreadcalls, "harmony spread-calls") \
V(harmony_spread_arrays, "harmony spread in array literals") \
V(harmony_unicode, "harmony unicode escapes") \
V(harmony_object, "harmony Object methods") \
V(harmony_rest_parameters, "harmony rest parameters")
// Once a shipping feature has proved stable in the wild, it will be dropped
......@@ -238,7 +237,6 @@ HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES)
// Feature dependencies.
DEFINE_IMPLICATION(harmony_classes, harmony_object_literals)
DEFINE_IMPLICATION(harmony_unicode_regexps, harmony_unicode)
......
......@@ -908,7 +908,6 @@ Parser::Parser(ParseInfo* info)
set_allow_harmony_modules(!info->is_native() && FLAG_harmony_modules);
set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions);
set_allow_harmony_classes(FLAG_harmony_classes);
set_allow_harmony_object_literals(FLAG_harmony_object_literals);
set_allow_harmony_sloppy(FLAG_harmony_sloppy);
set_allow_harmony_unicode(FLAG_harmony_unicode);
set_allow_harmony_computed_property_names(
......@@ -4369,7 +4368,6 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
SET_ALLOW(harmony_modules);
SET_ALLOW(harmony_arrow_functions);
SET_ALLOW(harmony_classes);
SET_ALLOW(harmony_object_literals);
SET_ALLOW(harmony_sloppy);
SET_ALLOW(harmony_unicode);
SET_ALLOW(harmony_computed_property_names);
......
......@@ -92,7 +92,6 @@ class ParserBase : public Traits {
allow_lazy_(false),
allow_natives_(false),
allow_harmony_arrow_functions_(false),
allow_harmony_object_literals_(false),
allow_harmony_sloppy_(false),
allow_harmony_computed_property_names_(false),
allow_harmony_rest_params_(false),
......@@ -109,7 +108,6 @@ class ParserBase : public Traits {
ALLOW_ACCESSORS(lazy);
ALLOW_ACCESSORS(natives);
ALLOW_ACCESSORS(harmony_arrow_functions);
ALLOW_ACCESSORS(harmony_object_literals);
ALLOW_ACCESSORS(harmony_sloppy);
ALLOW_ACCESSORS(harmony_computed_property_names);
ALLOW_ACCESSORS(harmony_rest_params);
......@@ -778,7 +776,6 @@ class ParserBase : public Traits {
bool allow_lazy_;
bool allow_natives_;
bool allow_harmony_arrow_functions_;
bool allow_harmony_object_literals_;
bool allow_harmony_sloppy_;
bool allow_harmony_computed_property_names_;
bool allow_harmony_rest_params_;
......@@ -2479,7 +2476,7 @@ ParserBase<Traits>::ParsePropertyDefinition(
bool is_get = false;
bool is_set = false;
bool name_is_static = false;
bool is_generator = allow_harmony_object_literals_ && Check(Token::MUL);
bool is_generator = Check(Token::MUL);
Token::Value name_token = peek();
int next_beg_pos = scanner()->peek_location().beg_pos;
......@@ -2503,8 +2500,7 @@ ParserBase<Traits>::ParsePropertyDefinition(
value = this->ParseAssignmentExpression(
true, classifier, CHECK_OK_CUSTOM(EmptyObjectLiteralProperty));
} else if (is_generator ||
(allow_harmony_object_literals_ && peek() == Token::LPAREN)) {
} else if (is_generator || peek() == Token::LPAREN) {
// Concise Method
if (!*is_computed_name) {
checker->CheckProperty(name_token, kMethodProperty, is_static,
......@@ -2576,9 +2572,8 @@ ParserBase<Traits>::ParsePropertyDefinition(
is_get ? ObjectLiteralProperty::GETTER : ObjectLiteralProperty::SETTER,
is_static, *is_computed_name);
} else if (!in_class && allow_harmony_object_literals_ &&
Token::IsIdentifier(name_token, language_mode(),
this->is_generator())) {
} else if (!in_class && Token::IsIdentifier(name_token, language_mode(),
this->is_generator())) {
DCHECK(!*is_computed_name);
DCHECK(!is_static);
......
......@@ -525,7 +525,6 @@ TEST(RegExpLiteral) {
TEST(ClassLiteral) {
FLAG_harmony_classes = true;
FLAG_harmony_sloppy = true;
FLAG_harmony_object_literals = true;
const char* src =
"(function(a,b) {"
" class C {"
......
......@@ -8689,7 +8689,6 @@ THREADED_TEST(AccessControlGetOwnPropertyNames) {
TEST(SuperAccessControl) {
i::FLAG_allow_natives_syntax = true;
i::FLAG_harmony_classes = true;
i::FLAG_harmony_object_literals = true;
v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope handle_scope(isolate);
v8::Handle<v8::ObjectTemplate> obj_template =
......@@ -8744,7 +8743,6 @@ TEST(SuperAccessControl) {
TEST(Regress470113) {
i::FLAG_harmony_classes = true;
i::FLAG_harmony_object_literals = true;
v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope handle_scope(isolate);
v8::Handle<v8::ObjectTemplate> obj_template =
......
This diff is collapsed.
......@@ -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-object-literals
(function TestSloppyMode() {
var o = {
eval() {
......
......@@ -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-object-literals --allow-natives-syntax
// Flags: --allow-natives-syntax
(function TestBasics() {
......
......@@ -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-object-literals
(function TestBasics() {
var x = 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-computed-property-names --harmony-object-literals
// Flags: --harmony-computed-property-names
function ID(x) {
......
......@@ -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-computed-property-names --harmony-object-literals
// Flags: --harmony-computed-property-names
// Flags: --harmony-classes --allow-natives-syntax
......
// Copyright 2013 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Flags: --noharmony-classes --noharmony-object-literals
// Should throw, not crash.
assertThrows("var o = { get /*space*/ () {} }");
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