Commit 353b40e9 authored by arv's avatar arv Committed by Commit bot

[es6] Remove harmony-classes flag

Move class tests to es6 directory

BUG=v8:3330
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#29336}
parent ff309a23
......@@ -1800,7 +1800,6 @@ void Genesis::InitializeBuiltinTypedArrays() {
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_regexps)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring)
......@@ -1837,7 +1836,6 @@ void Genesis::InstallNativeFunctions_harmony_proxies() {
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_arrow_functions)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
......@@ -2471,7 +2469,6 @@ bool Genesis::InstallExperimentalNatives() {
static const char* harmony_array_includes_natives[] = {
"native harmony-array-includes.js", nullptr};
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_regexps_natives[] = {"native harmony-regexp.js",
nullptr};
......
......@@ -204,7 +204,6 @@ DEFINE_IMPLICATION(es_staging, harmony)
#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") \
......
......@@ -907,7 +907,6 @@ Parser::Parser(ParseInfo* info)
set_allow_natives(FLAG_allow_natives_syntax || info->is_native());
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_sloppy(FLAG_harmony_sloppy);
set_allow_harmony_unicode(FLAG_harmony_unicode);
set_allow_harmony_computed_property_names(
......@@ -4367,7 +4366,6 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
SET_ALLOW(natives);
SET_ALLOW(harmony_modules);
SET_ALLOW(harmony_arrow_functions);
SET_ALLOW(harmony_classes);
SET_ALLOW(harmony_sloppy);
SET_ALLOW(harmony_unicode);
SET_ALLOW(harmony_computed_property_names);
......
......@@ -119,11 +119,9 @@ class ParserBase : public Traits {
#undef ALLOW_ACCESSORS
bool allow_harmony_modules() const { return scanner()->HarmonyModules(); }
bool allow_harmony_classes() const { return scanner()->HarmonyClasses(); }
bool allow_harmony_unicode() const { return scanner()->HarmonyUnicode(); }
void set_allow_harmony_modules(bool a) { scanner()->SetHarmonyModules(a); }
void set_allow_harmony_classes(bool a) { scanner()->SetHarmonyClasses(a); }
void set_allow_harmony_unicode(bool a) { scanner()->SetHarmonyUnicode(a); }
protected:
......
This diff is collapsed.
......@@ -483,12 +483,7 @@ class Scanner {
void SetHarmonyModules(bool modules) {
harmony_modules_ = modules;
}
bool HarmonyClasses() const {
return harmony_classes_;
}
void SetHarmonyClasses(bool classes) {
harmony_classes_ = classes;
}
bool HarmonyUnicode() const { return harmony_unicode_; }
void SetHarmonyUnicode(bool unicode) { harmony_unicode_ = unicode; }
......@@ -803,8 +798,6 @@ class Scanner {
bool has_multiline_comment_before_next_;
// Whether we scan 'module', 'import', 'export' as keywords.
bool harmony_modules_;
// Whether we scan 'class', 'extends', 'static' and 'super' as keywords.
bool harmony_classes_;
// Whether we allow \u{xxxxx}.
bool harmony_unicode_;
};
......
......@@ -523,7 +523,6 @@ TEST(RegExpLiteral) {
TEST(ClassLiteral) {
FLAG_harmony_classes = true;
FLAG_harmony_sloppy = true;
const char* src =
"(function(a,b) {"
......
......@@ -8688,7 +8688,6 @@ THREADED_TEST(AccessControlGetOwnPropertyNames) {
TEST(SuperAccessControl) {
i::FLAG_allow_natives_syntax = true;
i::FLAG_harmony_classes = true;
v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope handle_scope(isolate);
v8::Handle<v8::ObjectTemplate> obj_template =
......@@ -8742,7 +8741,6 @@ TEST(SuperAccessControl) {
TEST(Regress470113) {
i::FLAG_harmony_classes = true;
v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope handle_scope(isolate);
v8::Handle<v8::ObjectTemplate> obj_template =
......@@ -21327,7 +21325,6 @@ TEST(GetPrototypeHidden) {
TEST(ClassPrototypeCreationContext) {
i::FLAG_harmony_classes = true;
v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope handle_scope(isolate);
LocalContext env;
......
This diff is collapsed.
......@@ -28,7 +28,6 @@
"path": ["Classes"],
"main": "run.js",
"resources": ["super.js", "default-constructor.js"],
"flags": ["--harmony-classes"],
"results_regexp": "^%s\\-Classes\\(Score\\): (.+)$",
"tests": [
{"name": "Super"},
......
// Copyright 2014 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-classes
'use strict';
class C {
......
// Copyright 2014 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-classes
'use strict';
class 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-classes
// Flags: --harmony-rest-parameters
'use strict';
var _bad = "setting this should fail!";
......
// Copyright 2014 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-classes
'use strict';
class C {
......
// Copyright 2014 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-classes
'use strict';
class C {
......
// 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-classes
'use strict';
function f() {
......
......@@ -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-classes
function CheckError(source) {
var exception = null;
try {
......
......@@ -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-classes --harmony-sloppy
// Flags: --harmony-sloppy
(function Method() {
......
// Copyright 2014 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-classes
'use strict';
(function TestArgumentsAccess() {
......
......@@ -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-classes --min-preparse-length=0
// Flags: --min-preparse-length=0
'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: --harmony-classes --allow-natives-syntax
// Flags: --allow-natives-syntax
'use strict';
(function TestMaps() {
......
// 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-classes
'use strict';
(function TestDefaultConstructor() {
......
......@@ -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-classes --harmony-sloppy
// Flags: --harmony-sloppy
(function TestBasics() {
var C = class 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: --expose-debug-as debug --harmony-classes
// Flags: --expose-debug-as debug
'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: --expose-debug-as debug --harmony-classes
// Flags: --expose-debug-as debug
'use strict';
......
// Copyright 2014 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-classes
'use strict';
class Example { }
Object.observe(Example.prototype, 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: --harmony-classes --no-lazy
// Flags: --no-lazy
"use strict";
class Base {
}
......
......@@ -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-classes --allow-natives-syntax
// Flags: --allow-natives-syntax
(function TestSingleClass() {
......
......@@ -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-arrays --harmony-classes
// Flags: --harmony-arrays
(function testArrayConcatArity() {
"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: --harmony-arrow-functions --harmony-classes
// Flags: --harmony-arrow-functions
(function testInFunctionDeclaration() {
......
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --harmony-computed-property-names --harmony-sloppy
// Flags: --harmony-classes --allow-natives-syntax
// Flags: --allow-natives-syntax
function ID(x) {
......
......@@ -4,7 +4,7 @@
'use strict';
// Flags: --harmony-computed-property-names --harmony-classes
// Flags: --harmony-computed-property-names
function ID(x) {
......
......@@ -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-computed-property-names
// Flags: --harmony-classes --allow-natives-syntax
// Flags: --harmony-computed-property-names --allow-natives-syntax
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-classes --harmony-arrow-functions --allow-natives-syntax
// Flags: --harmony-arrow-functions --allow-natives-syntax
(function TestHomeObject() {
......
......@@ -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-classes --harmony-sloppy
// Flags: --harmony-computed-property-names --harmony-sloppy
assertThrows(function f() {
var t = { toString: function() { throw new Error(); } };
......
......@@ -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-classes
// Flags: --harmony-rest-parameters
(function testRestIndex() {
assertEquals(5, (function(...args) { return 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-classes --harmony-arrow-functions --allow-natives-syntax
// Flags: --harmony-arrow-functions --allow-natives-syntax
// Flags: --harmony-spreadcalls
(function TestSuperNamedLoads() {
......
......@@ -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: --strong-mode
// Flags: --harmony-classes --harmony-arrow-functions
// Flags: --strong-mode --harmony-arrow-functions
'use strong';
......
......@@ -2,7 +2,8 @@
// 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 --harmony_classes --harmony_computed-property_names
// Flags: --strong-mode --harmony-rest-parameters --harmony-arrow-functions
// Flags: --harmony-computed-property-names
// Note that it's essential for these tests that the reference is inside dead
// code (because we already produce ReferenceErrors for run-time unresolved
......
......@@ -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-classes --allow-natives-syntax
// Flags: --strong-mode --allow-natives-syntax
'use strong';
......
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