From c7eb436d09d5fa10ef41a3312edea2d7a2680126 Mon Sep 17 00:00:00 2001 From: adamk Date: Thu, 23 Jun 2016 18:11:08 -0700 Subject: [PATCH] Remove all harmony runtime flags which shipped in M51 Flags removed (all begin with "harmony-"): function-name instanceof iterator-close unicode-regexps regexp-exec regexp-subclass species BUG=v8:3566, v8:3648, v8:3699, v8:4093, v8:4447, v8:4602 Review-Url: https://codereview.chromium.org/2096933002 Cr-Commit-Position: refs/heads/master@{#37235} --- BUILD.gn | 3 - src/bootstrapper.cc | 36 ---------- src/flag-definitions.h | 7 -- src/isolate-inl.h | 2 - src/isolate.cc | 1 - src/js/array.js | 23 +++--- src/js/arraybuffer.js | 8 +++ src/js/collection.js | 16 +++++ src/js/harmony-regexp-exec.js | 37 ---------- src/js/harmony-species.js | 60 ---------------- src/js/harmony-unicode-regexps.js | 40 ----------- src/js/promise.js | 8 +++ src/js/regexp.js | 72 ++++++++----------- src/js/runtime.js | 48 ++++--------- src/js/symbol.js | 15 ++-- src/js/typedarray.js | 6 ++ src/lookup.h | 7 +- src/messages.cc | 12 ++-- src/objects.cc | 44 +++++------- src/parsing/parser-base.h | 17 ++--- src/parsing/parser.cc | 13 +--- src/parsing/pattern-rewriter.cc | 20 +++--- src/parsing/scanner.cc | 1 - src/runtime/runtime-object.cc | 8 +-- src/v8.gyp | 3 - test/cctest/test-api.cc | 2 - test/cctest/test-regexp.cc | 1 - test/fuzzer/regexp.cc | 1 - test/message/instanceof-noncallable.js | 2 +- test/message/instanceof-nonobject.js | 2 +- .../compiler/optimized-instanceof-1.js | 2 +- .../compiler/optimized-instanceof-2.js | 2 +- .../array-species-constructor-accessor.js | 2 +- .../array-species-constructor-delete.js | 2 +- .../array-species-constructor.js | 2 +- .../{harmony => es6}/array-species-delete.js | 2 +- .../array-species-modified.js | 2 +- .../array-species-parent-constructor.js | 2 +- .../{harmony => es6}/array-species-proto.js | 2 +- .../mjsunit/{harmony => es6}/array-species.js | 2 - .../{harmony => es6}/arraybuffer-species.js | 2 - test/mjsunit/es6/classes-subclass-builtins.js | 3 +- .../es6/debug-step-into-regexp-subclass.js | 2 +- .../mjsunit/{harmony => es6}/function-name.js | 2 - .../instanceof-es6.js => es6/instanceof.js} | 2 - .../{harmony => es6}/iterator-close.js | 2 - test/mjsunit/es6/legacy-subclassing.js | 38 ---------- test/mjsunit/es6/no-unicode-regexp-flag.js | 24 ------- test/mjsunit/es6/pattern-brand-check.js | 2 - .../{harmony => es6}/promise-species.js | 2 +- test/mjsunit/es6/regexp-constructor.js | 2 - test/mjsunit/es6/regexp-flags.js | 2 - test/mjsunit/{harmony => es6}/species.js | 2 - test/mjsunit/{harmony => es6}/string-match.js | 2 - .../{harmony => es6}/string-replace.js | 2 - test/mjsunit/es6/string-search.js | 2 - test/mjsunit/{harmony => es6}/string-split.js | 2 - .../{harmony => es6}/typedarray-species.js | 2 - .../unicode-character-ranges.js | 2 +- .../unicode-escapes-in-regexps.js | 2 - .../unicode-regexp-backrefs.js | 2 +- .../unicode-regexp-ignore-case-noi18n.js | 2 - .../unicode-regexp-ignore-case.js | 2 - .../unicode-regexp-last-index.js | 2 +- .../unicode-regexp-restricted-syntax.js | 2 - .../unicode-regexp-unanchored-advance.js | 2 - .../unicode-regexp-zero-length.js | 2 - test/mjsunit/harmony/regexp-change-exec.js | 2 - test/mjsunit/harmony/regexp-no-change-exec.js | 9 --- .../mjsunit/harmony/regexp-property-binary.js | 2 +- .../mjsunit/harmony/regexp-property-blocks.js | 2 +- .../harmony/regexp-property-char-class.js | 2 +- .../harmony/regexp-property-disabled.js | 2 +- .../harmony/regexp-property-enumerated.js | 2 +- .../harmony/regexp-property-exact-match.js | 2 +- .../regexp-property-general-category.js | 2 +- test/mjsunit/harmony/regexp-property-lu-ui.js | 2 +- .../harmony/regexp-property-scripts.js | 2 +- .../harmony/regexp-property-special.js | 2 +- test/mjsunit/messages.js | 2 +- test/mjsunit/mirror-regexp.js | 2 +- test/mjsunit/mjsunit.status | 4 +- test/mjsunit/object-literal.js | 2 - test/mjsunit/regexp-string-methods.js | 10 --- test/mjsunit/regress/regress-4659.js | 2 - test/mjsunit/regress/regress-4665-2.js | 33 --------- test/mjsunit/regress/regress-4665.js | 2 - test/mjsunit/regress/regress-5036.js | 2 - test/mjsunit/regress/regress-544991.js | 2 - test/mjsunit/regress/regress-crbug-600995.js | 10 --- test/mjsunit/regress/regress-crbug-605862.js | 2 - test/webkit/exception-for-nonobject.js | 2 - test/webkit/instance-of-immediates.js | 2 - 93 files changed, 179 insertions(+), 577 deletions(-) delete mode 100644 src/js/harmony-regexp-exec.js delete mode 100644 src/js/harmony-species.js delete mode 100644 src/js/harmony-unicode-regexps.js rename test/mjsunit/{harmony => es6}/array-species-constructor-accessor.js (94%) rename test/mjsunit/{harmony => es6}/array-species-constructor-delete.js (94%) rename test/mjsunit/{harmony => es6}/array-species-constructor.js (94%) rename test/mjsunit/{harmony => es6}/array-species-delete.js (94%) rename test/mjsunit/{harmony => es6}/array-species-modified.js (94%) rename test/mjsunit/{harmony => es6}/array-species-parent-constructor.js (94%) rename test/mjsunit/{harmony => es6}/array-species-proto.js (94%) rename test/mjsunit/{harmony => es6}/array-species.js (99%) rename test/mjsunit/{harmony => es6}/arraybuffer-species.js (97%) rename test/mjsunit/{harmony => es6}/function-name.js (99%) rename test/mjsunit/{harmony/instanceof-es6.js => es6/instanceof.js} (98%) rename test/mjsunit/{harmony => es6}/iterator-close.js (99%) delete mode 100644 test/mjsunit/es6/legacy-subclassing.js delete mode 100644 test/mjsunit/es6/no-unicode-regexp-flag.js rename test/mjsunit/{harmony => es6}/promise-species.js (96%) rename test/mjsunit/{harmony => es6}/species.js (98%) rename test/mjsunit/{harmony => es6}/string-match.js (94%) rename test/mjsunit/{harmony => es6}/string-replace.js (94%) rename test/mjsunit/{harmony => es6}/string-split.js (94%) rename test/mjsunit/{harmony => es6}/typedarray-species.js (99%) rename test/mjsunit/{harmony => es6}/unicode-character-ranges.js (98%) rename test/mjsunit/{harmony => es6}/unicode-escapes-in-regexps.js (99%) rename test/mjsunit/{harmony => es6}/unicode-regexp-backrefs.js (96%) rename test/mjsunit/{harmony => es6}/unicode-regexp-ignore-case-noi18n.js (98%) rename test/mjsunit/{harmony => es6}/unicode-regexp-ignore-case.js (98%) rename test/mjsunit/{harmony => es6}/unicode-regexp-last-index.js (98%) rename test/mjsunit/{harmony => es6}/unicode-regexp-restricted-syntax.js (98%) rename test/mjsunit/{harmony => es6}/unicode-regexp-unanchored-advance.js (87%) rename test/mjsunit/{harmony => es6}/unicode-regexp-zero-length.js (98%) delete mode 100644 test/mjsunit/harmony/regexp-no-change-exec.js delete mode 100644 test/mjsunit/regress/regress-4665-2.js delete mode 100644 test/mjsunit/regress/regress-crbug-600995.js diff --git a/BUILD.gn b/BUILD.gn index d4223967dd..47896c327d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -391,11 +391,8 @@ action("js2c_experimental") { "src/messages.h", "src/js/harmony-async-await.js", "src/js/harmony-atomics.js", - "src/js/harmony-regexp-exec.js", "src/js/harmony-sharedarraybuffer.js", "src/js/harmony-simd.js", - "src/js/harmony-species.js", - "src/js/harmony-unicode-regexps.js", "src/js/harmony-string-padding.js", "src/js/promise-extra.js", ] diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc index cc760cffed..218f5878eb 100644 --- a/src/bootstrapper.cc +++ b/src/bootstrapper.cc @@ -2671,7 +2671,6 @@ void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate, isolate->factory()->ToBoolean(FLAG), NONE); \ } - INITIALIZE_FLAG(FLAG_harmony_species) INITIALIZE_FLAG(FLAG_intl_extra) #undef INITIALIZE_FLAG @@ -2681,21 +2680,16 @@ void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate, #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ void Genesis::InitializeGlobal_##id() {} -EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_do_expressions) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_for_in) -EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_iterator_close) -EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_exec) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_lookbehind) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_named_captures) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_property) -EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_function_name) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_function_sent) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(promise_extra) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(intl_extra) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_explicit_tailcalls) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) -EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_instanceof) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_declarations) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_exponentiation_operator) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding) @@ -2719,19 +2713,6 @@ void InstallPublicSymbol(Factory* factory, Handle native_context, } -void Genesis::InitializeGlobal_harmony_regexp_subclass() { - if (!FLAG_harmony_regexp_subclass) return; - InstallPublicSymbol(factory(), native_context(), "match", - factory()->match_symbol()); - InstallPublicSymbol(factory(), native_context(), "replace", - factory()->replace_symbol()); - InstallPublicSymbol(factory(), native_context(), "search", - factory()->search_symbol()); - InstallPublicSymbol(factory(), native_context(), "split", - factory()->split_symbol()); -} - - void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { if (!FLAG_harmony_sharedarraybuffer) return; @@ -2870,13 +2851,6 @@ Handle Genesis::InstallArrayBuffer(Handle target, } -void Genesis::InitializeGlobal_harmony_species() { - if (!FLAG_harmony_species) return; - InstallPublicSymbol(factory(), native_context(), "species", - factory()->species_symbol()); -} - - Handle Genesis::InstallInternalArray(Handle target, const char* name, ElementsKind elements_kind) { @@ -3275,28 +3249,18 @@ bool Genesis::InstallNatives(GlobalContextType context_type) { bool Genesis::InstallExperimentalNatives() { - static const char* harmony_iterator_close_natives[] = {nullptr}; - static const char* harmony_species_natives[] = {"native harmony-species.js", - nullptr}; static const char* harmony_explicit_tailcalls_natives[] = {nullptr}; static const char* harmony_tailcalls_natives[] = {nullptr}; - static const char* harmony_unicode_regexps_natives[] = { - "native harmony-unicode-regexps.js", nullptr}; static const char* harmony_sharedarraybuffer_natives[] = { "native harmony-sharedarraybuffer.js", "native harmony-atomics.js", NULL}; static const char* harmony_simd_natives[] = {"native harmony-simd.js", nullptr}; static const char* harmony_do_expressions_natives[] = {nullptr}; static const char* harmony_for_in_natives[] = {nullptr}; - static const char* harmony_regexp_exec_natives[] = { - "native harmony-regexp-exec.js", nullptr}; - static const char* harmony_regexp_subclass_natives[] = {nullptr}; static const char* harmony_regexp_lookbehind_natives[] = {nullptr}; - static const char* harmony_instanceof_natives[] = {nullptr}; static const char* harmony_restrictive_declarations_natives[] = {nullptr}; static const char* harmony_regexp_named_captures_natives[] = {nullptr}; static const char* harmony_regexp_property_natives[] = {nullptr}; - static const char* harmony_function_name_natives[] = {nullptr}; static const char* harmony_function_sent_natives[] = {nullptr}; static const char* promise_extra_natives[] = {"native promise-extra.js", nullptr}; diff --git a/src/flag-definitions.h b/src/flag-definitions.h index 657022cbb3..f9766d0f13 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -230,15 +230,8 @@ DEFINE_IMPLICATION(es_staging, move_object_start) // Features that are shipping (turned on by default, but internal flag remains). #define HARMONY_SHIPPING(V) \ - V(harmony_function_name, "harmony Function name inference") \ - V(harmony_instanceof, "harmony instanceof support") \ - V(harmony_iterator_close, "harmony iterator finalization") \ - V(harmony_unicode_regexps, "harmony unicode regexps") \ - V(harmony_regexp_exec, "harmony RegExp exec override behavior") \ - V(harmony_regexp_subclass, "harmony regexp subclassing") \ V(harmony_restrictive_declarations, \ "harmony limitations on sloppy mode function declarations") \ - V(harmony_species, "harmony Symbol.species") \ V(harmony_exponentiation_operator, "harmony exponentiation operator `**`") // Once a shipping feature has proved stable in the wild, it will be dropped diff --git a/src/isolate-inl.h b/src/isolate-inl.h index c80936e0c7..46f29b652d 100644 --- a/src/isolate-inl.h +++ b/src/isolate-inl.h @@ -102,7 +102,6 @@ NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR) #undef NATIVE_CONTEXT_FIELD_ACCESSOR bool Isolate::IsArraySpeciesLookupChainIntact() { - if (!FLAG_harmony_species) return true; // Note: It would be nice to have debug checks to make sure that the // species protector is accurate, but this would be hard to do for most of // what the protector stands for: @@ -121,7 +120,6 @@ bool Isolate::IsArraySpeciesLookupChainIntact() { } bool Isolate::IsHasInstanceLookupChainIntact() { - if (!FLAG_harmony_instanceof) return true; PropertyCell* has_instance_cell = heap()->has_instance_protector(); return has_instance_cell->value() == Smi::FromInt(kArrayProtectorValid); } diff --git a/src/isolate.cc b/src/isolate.cc index f9e87bfaba..c5e2640544 100644 --- a/src/isolate.cc +++ b/src/isolate.cc @@ -2657,7 +2657,6 @@ void Isolate::InvalidateIsConcatSpreadableProtector() { } void Isolate::InvalidateArraySpeciesProtector() { - if (!FLAG_harmony_species) return; DCHECK(factory()->species_protector()->value()->IsSmi()); DCHECK(IsArraySpeciesLookupChainIntact()); factory()->species_protector()->set_value( diff --git a/src/js/array.js b/src/js/array.js index 355f9962b6..c29b8f7256 100644 --- a/src/js/array.js +++ b/src/js/array.js @@ -11,7 +11,6 @@ // ------------------------------------------------------------------- // Imports -var FLAG_harmony_species; var GetIterator; var GetMethod; var GlobalArray = global.Array; @@ -23,6 +22,7 @@ var MinSimple; var ObjectHasOwnProperty; var ObjectToString = utils.ImportNow("object_to_string"); var iteratorSymbol = utils.ImportNow("iterator_symbol"); +var speciesSymbol = utils.ImportNow("species_symbol"); var unscopablesSymbol = utils.ImportNow("unscopables_symbol"); utils.Import(function(from) { @@ -34,23 +34,12 @@ utils.Import(function(from) { ObjectHasOwnProperty = from.ObjectHasOwnProperty; }); -utils.ImportFromExperimental(function(from) { - FLAG_harmony_species = from.FLAG_harmony_species; -}); - // ------------------------------------------------------------------- function ArraySpeciesCreate(array, length) { - var constructor; - length = INVERT_NEG_ZERO(length); - - if (FLAG_harmony_species) { - constructor = %ArraySpeciesConstructor(array); - } else { - constructor = GlobalArray; - } + var constructor = %ArraySpeciesConstructor(array); return new constructor(length); } @@ -1642,6 +1631,12 @@ function ArrayOf(...args) { return array; } + +function ArraySpecies() { + return this; +} + + // ------------------------------------------------------------------- // Set up non-enumerable constructor property on the Array.prototype @@ -1717,6 +1712,8 @@ utils.InstallFunctions(GlobalArray.prototype, DONT_ENUM, [ "includes", getFunction("includes", ArrayIncludes, 1), ]); +utils.InstallGetter(GlobalArray, speciesSymbol, ArraySpecies); + %FinishArrayPrototypeSetup(GlobalArray.prototype); // The internal Array prototype doesn't need to be fancy, since it's never diff --git a/src/js/arraybuffer.js b/src/js/arraybuffer.js index e739960e5b..b602dcbf25 100644 --- a/src/js/arraybuffer.js +++ b/src/js/arraybuffer.js @@ -16,6 +16,7 @@ var MakeTypeError; var MaxSimple; var MinSimple; var SpeciesConstructor; +var speciesSymbol = utils.ImportNow("species_symbol"); utils.Import(function(from) { MakeTypeError = from.MakeTypeError; @@ -84,6 +85,13 @@ function ArrayBufferSlice(start, end) { return result; } + +function ArrayBufferSpecies() { + return this; +} + +utils.InstallGetter(GlobalArrayBuffer, speciesSymbol, ArrayBufferSpecies); + utils.InstallGetter(GlobalArrayBuffer.prototype, "byteLength", ArrayBufferGetByteLen); diff --git a/src/js/collection.js b/src/js/collection.js index 0d7195d53e..bbb7ed247b 100644 --- a/src/js/collection.js +++ b/src/js/collection.js @@ -19,6 +19,7 @@ var MakeTypeError; var MapIterator; var NumberIsNaN; var SetIterator; +var speciesSymbol = utils.ImportNow("species_symbol"); var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); utils.Import(function(from) { @@ -255,6 +256,12 @@ function SetForEach(f, receiver) { } } + +function SetSpecies() { + return this; +} + + // ------------------------------------------------------------------- %SetCode(GlobalSet, SetConstructor); @@ -266,6 +273,8 @@ function SetForEach(f, receiver) { %FunctionSetLength(SetForEach, 1); +utils.InstallGetter(GlobalSet, speciesSymbol, SetSpecies); + // Set up the non-enumerable functions on the Set prototype object. utils.InstallGetter(GlobalSet.prototype, "size", SetGetSize); utils.InstallFunctions(GlobalSet.prototype, DONT_ENUM, [ @@ -435,6 +444,11 @@ function MapForEach(f, receiver) { } } + +function MapSpecies() { + return this; +} + // ------------------------------------------------------------------- %SetCode(GlobalMap, MapConstructor); @@ -446,6 +460,8 @@ function MapForEach(f, receiver) { %FunctionSetLength(MapForEach, 1); +utils.InstallGetter(GlobalMap, speciesSymbol, MapSpecies); + // Set up the non-enumerable functions on the Map prototype object. utils.InstallGetter(GlobalMap.prototype, "size", MapGetSize); utils.InstallFunctions(GlobalMap.prototype, DONT_ENUM, [ diff --git a/src/js/harmony-regexp-exec.js b/src/js/harmony-regexp-exec.js deleted file mode 100644 index e2eece98aa..0000000000 --- a/src/js/harmony-regexp-exec.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2012 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. - -(function(global, utils) { - -%CheckIsBootstrapping(); - -// ------------------------------------------------------------------- -// Imports - -var GlobalRegExp = global.RegExp; -var RegExpSubclassExecJS = utils.ImportNow("RegExpSubclassExecJS"); -var RegExpSubclassMatch = utils.ImportNow("RegExpSubclassMatch"); -var RegExpSubclassReplace = utils.ImportNow("RegExpSubclassReplace"); -var RegExpSubclassSearch = utils.ImportNow("RegExpSubclassSearch"); -var RegExpSubclassSplit = utils.ImportNow("RegExpSubclassSplit"); -var RegExpSubclassTest = utils.ImportNow("RegExpSubclassTest"); -var matchSymbol = utils.ImportNow("match_symbol"); -var replaceSymbol = utils.ImportNow("replace_symbol"); -var searchSymbol = utils.ImportNow("search_symbol"); -var splitSymbol = utils.ImportNow("split_symbol"); - -utils.OverrideFunction(GlobalRegExp.prototype, "exec", - RegExpSubclassExecJS, true); -utils.OverrideFunction(GlobalRegExp.prototype, matchSymbol, - RegExpSubclassMatch, true); -utils.OverrideFunction(GlobalRegExp.prototype, replaceSymbol, - RegExpSubclassReplace, true); -utils.OverrideFunction(GlobalRegExp.prototype, searchSymbol, - RegExpSubclassSearch, true); -utils.OverrideFunction(GlobalRegExp.prototype, splitSymbol, - RegExpSubclassSplit, true); -utils.OverrideFunction(GlobalRegExp.prototype, "test", - RegExpSubclassTest, true); - -}) diff --git a/src/js/harmony-species.js b/src/js/harmony-species.js deleted file mode 100644 index 426ac466e7..0000000000 --- a/src/js/harmony-species.js +++ /dev/null @@ -1,60 +0,0 @@ -// 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. - -(function(global, utils, extrasUtils) { - -"use strict"; - -%CheckIsBootstrapping(); - -var GlobalArray = global.Array; -// It is important that this file is run after src/js/typedarray.js, -// otherwise GlobalTypedArray would be Object, and we would break -// old versions of Zepto. -var GlobalTypedArray = global.Uint8Array.__proto__; -var GlobalMap = global.Map; -var GlobalSet = global.Set; -var GlobalArrayBuffer = global.ArrayBuffer; -var GlobalPromise = global.Promise; -var GlobalRegExp = global.RegExp; -var speciesSymbol = utils.ImportNow("species_symbol"); - -function ArraySpecies() { - return this; -} - -function TypedArraySpecies() { - return this; -} - -function MapSpecies() { - return this; -} - -function SetSpecies() { - return this; -} - -function ArrayBufferSpecies() { - return this; -} - -function PromiseSpecies() { - return this; -} - -function RegExpSpecies() { - return this; -} - -utils.InstallGetter(GlobalArray, speciesSymbol, ArraySpecies, DONT_ENUM); -utils.InstallGetter(GlobalTypedArray, speciesSymbol, TypedArraySpecies, DONT_ENUM); -utils.InstallGetter(GlobalMap, speciesSymbol, MapSpecies, DONT_ENUM); -utils.InstallGetter(GlobalSet, speciesSymbol, SetSpecies, DONT_ENUM); -utils.InstallGetter(GlobalArrayBuffer, speciesSymbol, ArrayBufferSpecies, - DONT_ENUM); -utils.InstallGetter(GlobalPromise, speciesSymbol, PromiseSpecies, DONT_ENUM); -utils.InstallGetter(GlobalRegExp, speciesSymbol, RegExpSpecies, DONT_ENUM); - -}); diff --git a/src/js/harmony-unicode-regexps.js b/src/js/harmony-unicode-regexps.js deleted file mode 100644 index 16d06ba7e3..0000000000 --- a/src/js/harmony-unicode-regexps.js +++ /dev/null @@ -1,40 +0,0 @@ -// 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. - -(function(global, utils) { - -'use strict'; - -%CheckIsBootstrapping(); - -// ------------------------------------------------------------------- -// Imports - -var GlobalRegExp = global.RegExp; -var GlobalRegExpPrototype = GlobalRegExp.prototype; -var MakeTypeError; - -utils.Import(function(from) { - MakeTypeError = from.MakeTypeError; -}); - -// ------------------------------------------------------------------- - -// ES6 21.2.5.15. -function RegExpGetUnicode() { - if (!IS_REGEXP(this)) { - // TODO(littledan): Remove this RegExp compat workaround - if (this === GlobalRegExpPrototype) { - %IncrementUseCounter(kRegExpPrototypeUnicodeGetter); - return UNDEFINED; - } - throw MakeTypeError(kRegExpNonRegExp, "RegExp.prototype.unicode"); - } - return TO_BOOLEAN(REGEXP_UNICODE(this)); -} -%SetForceInlineFlag(RegExpGetUnicode); - -utils.InstallGetter(GlobalRegExp.prototype, 'unicode', RegExpGetUnicode); - -}) diff --git a/src/js/promise.js b/src/js/promise.js index 1295363d97..5e8c460ddf 100644 --- a/src/js/promise.js +++ b/src/js/promise.js @@ -27,6 +27,7 @@ var promiseRawSymbol = utils.ImportNow("promise_raw_symbol"); var promiseStateSymbol = utils.ImportNow("promise_state_symbol"); var promiseResultSymbol = utils.ImportNow("promise_result_symbol"); var SpeciesConstructor; +var speciesSymbol = utils.ImportNow("species_symbol"); var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); utils.Import(function(from) { @@ -563,6 +564,11 @@ function PromiseHasUserDefinedRejectHandler() { return PromiseHasUserDefinedRejectHandlerRecursive(this); }; + +function PromiseSpecies() { + return this; +} + // ------------------------------------------------------------------- // Install exported functions. @@ -577,6 +583,8 @@ utils.InstallFunctions(GlobalPromise, DONT_ENUM, [ "resolve", PromiseResolve ]); +utils.InstallGetter(GlobalPromise, speciesSymbol, PromiseSpecies); + utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [ "then", PromiseThen, "catch", PromiseCatch diff --git a/src/js/regexp.js b/src/js/regexp.js index ef6a4aed05..b2ba2dfa4e 100644 --- a/src/js/regexp.js +++ b/src/js/regexp.js @@ -24,6 +24,7 @@ var MinSimple; var matchSymbol = utils.ImportNow("match_symbol"); var replaceSymbol = utils.ImportNow("replace_symbol"); var searchSymbol = utils.ImportNow("search_symbol"); +var speciesSymbol = utils.ImportNow("species_symbol"); var splitSymbol = utils.ImportNow("split_symbol"); var SpeciesConstructor; @@ -539,22 +540,6 @@ function RegExpSubclassSplit(string, limit) { %FunctionRemovePrototype(RegExpSubclassSplit); -// Legacy implementation of RegExp.prototype[Symbol.match] which -// doesn't properly call the underlying exec method -function RegExpMatch(string) { - if (!IS_REGEXP(this)) { - throw MakeTypeError(kIncompatibleMethodReceiver, - "RegExp.prototype.@@match", this); - } - var subject = TO_STRING(string); - - if (!REGEXP_GLOBAL(this)) return RegExpExecNoTests(this, subject, 0); - this.lastIndex = 0; - var result = %StringMatch(subject, this, RegExpLastMatchInfo); - return result; -} - - // ES#sec-regexp.prototype-@@match // RegExp.prototype [ @@match ] ( string ) function RegExpSubclassMatch(string) { @@ -954,19 +939,6 @@ function RegExpSubclassReplace(string, replace) { %FunctionRemovePrototype(RegExpSubclassReplace); -// Legacy implementation of RegExp.prototype[Symbol.search] which -// doesn't properly use the overridden exec method -function RegExpSearch(string) { - if (!IS_REGEXP(this)) { - throw MakeTypeError(kIncompatibleMethodReceiver, - "RegExp.prototype.@@search", this); - } - var match = DoRegExpExec(this, TO_STRING(string), 0); - if (match) return match[CAPTURE0]; - return -1; -} - - // ES#sec-regexp.prototype-@@search // RegExp.prototype [ @@search ] ( string ) function RegExpSubclassSearch(string) { @@ -1134,6 +1106,27 @@ function RegExpGetSticky() { } %SetForceInlineFlag(RegExpGetSticky); + +// ES6 21.2.5.15. +function RegExpGetUnicode() { + if (!IS_REGEXP(this)) { + // TODO(littledan): Remove this RegExp compat workaround + if (this === GlobalRegExpPrototype) { + %IncrementUseCounter(kRegExpPrototypeUnicodeGetter); + return UNDEFINED; + } + throw MakeTypeError(kRegExpNonRegExp, "RegExp.prototype.unicode"); + } + return TO_BOOLEAN(REGEXP_UNICODE(this)); +} +%SetForceInlineFlag(RegExpGetUnicode); + + +function RegExpSpecies() { + return this; +} + + // ------------------------------------------------------------------- %FunctionSetInstanceClassName(GlobalRegExp, 'RegExp'); @@ -1143,15 +1136,17 @@ GlobalRegExpPrototype = new GlobalObject(); GlobalRegExp.prototype, 'constructor', GlobalRegExp, DONT_ENUM); %SetCode(GlobalRegExp, RegExpConstructor); +utils.InstallGetter(GlobalRegExp, speciesSymbol, RegExpSpecies); + utils.InstallFunctions(GlobalRegExp.prototype, DONT_ENUM, [ - "exec", RegExpExecJS, - "test", RegExpTest, + "exec", RegExpSubclassExecJS, + "test", RegExpSubclassTest, "toString", RegExpToString, "compile", RegExpCompileJS, - matchSymbol, RegExpMatch, - replaceSymbol, RegExpReplace, - searchSymbol, RegExpSearch, - splitSymbol, RegExpSplit, + matchSymbol, RegExpSubclassMatch, + replaceSymbol, RegExpSubclassReplace, + searchSymbol, RegExpSubclassSearch, + splitSymbol, RegExpSubclassSplit, ]); utils.InstallGetter(GlobalRegExp.prototype, 'flags', RegExpGetFlags); @@ -1160,6 +1155,7 @@ utils.InstallGetter(GlobalRegExp.prototype, 'ignoreCase', RegExpGetIgnoreCase); utils.InstallGetter(GlobalRegExp.prototype, 'multiline', RegExpGetMultiline); utils.InstallGetter(GlobalRegExp.prototype, 'source', RegExpGetSource); utils.InstallGetter(GlobalRegExp.prototype, 'sticky', RegExpGetSticky); +utils.InstallGetter(GlobalRegExp.prototype, 'unicode', RegExpGetUnicode); // The properties `input` and `$_` are aliases for each other. When this // value is set the value it is set to is coerced to a string. @@ -1234,12 +1230,6 @@ utils.Export(function(to) { to.RegExpExec = DoRegExpExec; to.RegExpInitialize = RegExpInitialize; to.RegExpLastMatchInfo = RegExpLastMatchInfo; - to.RegExpSubclassExecJS = RegExpSubclassExecJS; - to.RegExpSubclassMatch = RegExpSubclassMatch; - to.RegExpSubclassReplace = RegExpSubclassReplace; - to.RegExpSubclassSearch = RegExpSubclassSearch; - to.RegExpSubclassSplit = RegExpSubclassSplit; - to.RegExpSubclassTest = RegExpSubclassTest; to.RegExpTest = RegExpTest; }); diff --git a/src/js/runtime.js b/src/js/runtime.js index 23c329651a..216685fe4f 100644 --- a/src/js/runtime.js +++ b/src/js/runtime.js @@ -16,7 +16,6 @@ %CheckIsBootstrapping(); -var FLAG_harmony_species; var GlobalArray = global.Array; var GlobalBoolean = global.Boolean; var GlobalString = global.String; @@ -30,10 +29,6 @@ utils.Import(function(from) { speciesSymbol = from.species_symbol; }); -utils.ImportFromExperimental(function(from) { - FLAG_harmony_species = from.FLAG_harmony_species; -}); - // ---------------------------------------------------------------------------- @@ -65,35 +60,22 @@ function MinSimple(a, b) { // ES2015 7.3.20 -// For the fallback with --harmony-species off, there are two possible choices: -// - "conservative": return defaultConstructor -// - "not conservative": return object.constructor -// This fallback path is only needed in the transition to ES2015, and the -// choice is made simply to preserve the previous behavior so that we don't -// have a three-step upgrade: old behavior, unspecified intermediate behavior, -// and ES2015. -// In some cases, we were "conservative" (e.g., ArrayBuffer, RegExp), and in -// other cases we were "not conservative (e.g., TypedArray, Promise). -function SpeciesConstructor(object, defaultConstructor, conservative) { - if (FLAG_harmony_species) { - var constructor = object.constructor; - if (IS_UNDEFINED(constructor)) { - return defaultConstructor; - } - if (!IS_RECEIVER(constructor)) { - throw MakeTypeError(kConstructorNotReceiver); - } - var species = constructor[speciesSymbol]; - if (IS_NULL_OR_UNDEFINED(species)) { - return defaultConstructor; - } - if (%IsConstructor(species)) { - return species; - } - throw MakeTypeError(kSpeciesNotConstructor); - } else { - return conservative ? defaultConstructor : object.constructor; +function SpeciesConstructor(object, defaultConstructor) { + var constructor = object.constructor; + if (IS_UNDEFINED(constructor)) { + return defaultConstructor; } + if (!IS_RECEIVER(constructor)) { + throw MakeTypeError(kConstructorNotReceiver); + } + var species = constructor[speciesSymbol]; + if (IS_NULL_OR_UNDEFINED(species)) { + return defaultConstructor; + } + if (%IsConstructor(species)) { + return species; + } + throw MakeTypeError(kSpeciesNotConstructor); } //---------------------------------------------------------------------------- diff --git a/src/js/symbol.js b/src/js/symbol.js index 7365655e24..2e7cc53d00 100644 --- a/src/js/symbol.js +++ b/src/js/symbol.js @@ -17,6 +17,11 @@ var isConcatSpreadableSymbol = utils.ImportNow("is_concat_spreadable_symbol"); var iteratorSymbol = utils.ImportNow("iterator_symbol"); var MakeTypeError; +var matchSymbol = utils.ImportNow("match_symbol"); +var replaceSymbol = utils.ImportNow("replace_symbol"); +var searchSymbol = utils.ImportNow("search_symbol"); +var speciesSymbol = utils.ImportNow("species_symbol"); +var splitSymbol = utils.ImportNow("split_symbol"); var toPrimitiveSymbol = utils.ImportNow("to_primitive_symbol"); var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); var unscopablesSymbol = utils.ImportNow("unscopables_symbol"); @@ -78,11 +83,11 @@ utils.InstallConstants(GlobalSymbol, [ "hasInstance", hasInstanceSymbol, "isConcatSpreadable", isConcatSpreadableSymbol, "iterator", iteratorSymbol, - // TODO(yangguo): expose when implemented. - // "match", matchSymbol, - // "replace", replaceSymbol, - // "search", searchSymbol, - // "split, splitSymbol, + "match", matchSymbol, + "replace", replaceSymbol, + "search", searchSymbol, + "species", speciesSymbol, + "split", splitSymbol, "toPrimitive", toPrimitiveSymbol, "toStringTag", toStringTagSymbol, "unscopables", unscopablesSymbol, diff --git a/src/js/typedarray.js b/src/js/typedarray.js index fe0006f3c7..ac4e842be2 100644 --- a/src/js/typedarray.js +++ b/src/js/typedarray.js @@ -47,6 +47,7 @@ var PackedArrayReverse; var SpeciesConstructor; var ToPositiveInteger; var iteratorSymbol = utils.ImportNow("iterator_symbol"); +var speciesSymbol = utils.ImportNow("species_symbol"); var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); macro TYPED_ARRAYS(FUNCTION) @@ -784,6 +785,10 @@ function TypedArrayConstructor() { } } +function TypedArraySpecies() { + return this; +} + // ------------------------------------------------------------------- %SetCode(GlobalTypedArray, TypedArrayConstructor); @@ -791,6 +796,7 @@ utils.InstallFunctions(GlobalTypedArray, DONT_ENUM, [ "from", TypedArrayFrom, "of", TypedArrayOf ]); +utils.InstallGetter(GlobalTypedArray, speciesSymbol, TypedArraySpecies); utils.InstallGetter(GlobalTypedArray.prototype, toStringTagSymbol, TypedArrayGetToStringTag); utils.InstallFunctions(GlobalTypedArray.prototype, DONT_ENUM, [ diff --git a/src/lookup.h b/src/lookup.h index bb65639165..87821c2b7e 100644 --- a/src/lookup.h +++ b/src/lookup.h @@ -262,10 +262,9 @@ class LookupIterator final BASE_EMBEDDED { inline void UpdateProtector() { if (IsElement()) return; if (*name_ == heap()->is_concat_spreadable_symbol() || - (FLAG_harmony_species && (*name_ == heap()->constructor_string() || - *name_ == heap()->species_symbol())) || - (FLAG_harmony_instanceof && - (*name_ == heap()->has_instance_symbol()))) { + *name_ == heap()->constructor_string() || + *name_ == heap()->species_symbol() || + *name_ == heap()->has_instance_symbol()) { InternalUpdateProtector(); } } diff --git a/src/messages.cc b/src/messages.cc index d5a15256b9..2b0cdfc084 100644 --- a/src/messages.cc +++ b/src/messages.cc @@ -265,13 +265,11 @@ Handle CallSite::GetMethodName() { Handle name = Handle::cast(function_name); // ES2015 gives getters and setters name prefixes which must // be stripped to find the property name. - if (name->IsString() && FLAG_harmony_function_name) { - Handle name_string = Handle::cast(name); - if (name_string->IsUtf8EqualTo(CStrVector("get "), true) || - name_string->IsUtf8EqualTo(CStrVector("set "), true)) { - name = isolate_->factory()->NewProperSubString(name_string, 4, - name_string->length()); - } + Handle name_string = Handle::cast(name); + if (name_string->IsUtf8EqualTo(CStrVector("get "), true) || + name_string->IsUtf8EqualTo(CStrVector("set "), true)) { + name = isolate_->factory()->NewProperSubString(name_string, 4, + name_string->length()); } if (CheckMethodName(isolate_, obj, name, fun_, LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR)) { diff --git a/src/objects.cc b/src/objects.cc index aa4c3349fa..15da7353b8 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -614,30 +614,28 @@ MaybeHandle Object::OrdinaryHasInstance(Isolate* isolate, // static MaybeHandle Object::InstanceOf(Isolate* isolate, Handle object, Handle callable) { - if (FLAG_harmony_instanceof) { - // The {callable} must be a receiver. - if (!callable->IsJSReceiver()) { - THROW_NEW_ERROR( - isolate, NewTypeError(MessageTemplate::kNonObjectInInstanceOfCheck), - Object); - } + // The {callable} must be a receiver. + if (!callable->IsJSReceiver()) { + THROW_NEW_ERROR(isolate, + NewTypeError(MessageTemplate::kNonObjectInInstanceOfCheck), + Object); + } - // Lookup the @@hasInstance method on {callable}. - Handle inst_of_handler; + // Lookup the @@hasInstance method on {callable}. + Handle inst_of_handler; + ASSIGN_RETURN_ON_EXCEPTION( + isolate, inst_of_handler, + JSReceiver::GetMethod(Handle::cast(callable), + isolate->factory()->has_instance_symbol()), + Object); + if (!inst_of_handler->IsUndefined(isolate)) { + // Call the {inst_of_handler} on the {callable}. + Handle result; ASSIGN_RETURN_ON_EXCEPTION( - isolate, inst_of_handler, - JSReceiver::GetMethod(Handle::cast(callable), - isolate->factory()->has_instance_symbol()), + isolate, result, + Execution::Call(isolate, inst_of_handler, callable, 1, &object), Object); - if (!inst_of_handler->IsUndefined(isolate)) { - // Call the {inst_of_handler} on the {callable}. - Handle result; - ASSIGN_RETURN_ON_EXCEPTION( - isolate, result, - Execution::Call(isolate, inst_of_handler, callable, 1, &object), - Object); - return isolate->factory()->ToBoolean(result->BooleanValue()); - } + return isolate->factory()->ToBoolean(result->BooleanValue()); } // The {callable} must have a [[Call]] internal method. @@ -1623,9 +1621,6 @@ bool Object::SameValueZero(Object* other) { MaybeHandle Object::ArraySpeciesConstructor( Isolate* isolate, Handle original_array) { Handle default_species = isolate->array_function(); - if (!FLAG_harmony_species) { - return default_species; - } if (original_array->IsJSArray() && Handle::cast(original_array)->HasArrayPrototype(isolate) && isolate->IsArraySpeciesLookupChainIntact()) { @@ -15830,7 +15825,6 @@ JSRegExp::Flags RegExpFlagsFromString(Handle flags, bool* success) { flag = JSRegExp::kMultiline; break; case 'u': - if (!FLAG_harmony_unicode_regexps) return JSRegExp::Flags(0); flag = JSRegExp::kUnicode; break; case 'y': diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h index 9b1a2dcabd..f8a15a4796 100644 --- a/src/parsing/parser-base.h +++ b/src/parsing/parser-base.h @@ -196,7 +196,6 @@ class ParserBase : public Traits { allow_harmony_restrictive_declarations_(false), allow_harmony_do_expressions_(false), allow_harmony_for_in_(false), - allow_harmony_function_name_(false), allow_harmony_function_sent_(false), allow_harmony_async_await_(false), allow_harmony_restrictive_generators_(false) {} @@ -217,7 +216,6 @@ class ParserBase : public Traits { ALLOW_ACCESSORS(harmony_restrictive_declarations); ALLOW_ACCESSORS(harmony_do_expressions); ALLOW_ACCESSORS(harmony_for_in); - ALLOW_ACCESSORS(harmony_function_name); ALLOW_ACCESSORS(harmony_function_sent); ALLOW_ACCESSORS(harmony_async_await); ALLOW_ACCESSORS(harmony_restrictive_generators); @@ -1188,7 +1186,6 @@ class ParserBase : public Traits { bool allow_harmony_restrictive_declarations_; bool allow_harmony_do_expressions_; bool allow_harmony_for_in_; - bool allow_harmony_function_name_; bool allow_harmony_function_sent_; bool allow_harmony_async_await_; bool allow_harmony_restrictive_generators_; @@ -1973,9 +1970,7 @@ ParserBase::ParsePropertyDefinition( Scanner::Location(next_beg_pos, scanner()->location().end_pos), MessageTemplate::kInvalidCoverInitializedName); - if (allow_harmony_function_name()) { - Traits::SetFunctionNameFromIdentifierRef(rhs, lhs); - } + Traits::SetFunctionNameFromIdentifierRef(rhs, lhs); } else { value = lhs; } @@ -2130,9 +2125,7 @@ typename ParserBase::ExpressionT ParserBase::ParseObjectLiteral( if (fni_ != nullptr) fni_->Infer(); - if (allow_harmony_function_name()) { - Traits::SetFunctionNameFromPropertyName(property, name); - } + Traits::SetFunctionNameFromPropertyName(property, name); } Expect(Token::RBRACE, CHECK_OK); @@ -2387,7 +2380,7 @@ ParserBase::ParseAssignmentExpression(bool accept_IN, } } - if (op == Token::ASSIGN && allow_harmony_function_name()) { + if (op == Token::ASSIGN) { Traits::SetFunctionNameFromIdentifierRef(right, expression); } @@ -3185,9 +3178,7 @@ void ParserBase::ParseFormalParameter( init_classifier.Discard(); classifier->RecordNonSimpleParameter(); - if (allow_harmony_function_name()) { - Traits::SetFunctionNameFromIdentifierRef(initializer, pattern); - } + Traits::SetFunctionNameFromIdentifierRef(initializer, pattern); } Traits::AddFormalParameter(parameters, pattern, initializer, diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc index 17b8acc06a..389068162d 100644 --- a/src/parsing/parser.cc +++ b/src/parsing/parser.cc @@ -808,7 +808,6 @@ Parser::Parser(ParseInfo* info) info->isolate()->is_tail_call_elimination_enabled()); set_allow_harmony_do_expressions(FLAG_harmony_do_expressions); set_allow_harmony_for_in(FLAG_harmony_for_in); - set_allow_harmony_function_name(FLAG_harmony_function_name); set_allow_harmony_function_sent(FLAG_harmony_function_sent); set_allow_harmony_restrictive_declarations( FLAG_harmony_restrictive_declarations); @@ -2444,9 +2443,7 @@ Block* Parser::ParseVariableDeclarations( } } - if (allow_harmony_function_name()) { - ParserTraits::SetFunctionNameFromIdentifierRef(value, pattern); - } + ParserTraits::SetFunctionNameFromIdentifierRef(value, pattern); // End position of the initializer is after the assignment expression. initializer_position = scanner()->location().end_pos; @@ -4875,7 +4872,6 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser( SET_ALLOW(natives); SET_ALLOW(harmony_do_expressions); SET_ALLOW(harmony_for_in); - SET_ALLOW(harmony_function_name); SET_ALLOW(harmony_function_sent); SET_ALLOW(harmony_exponentiation_operator); SET_ALLOW(harmony_restrictive_declarations); @@ -4974,8 +4970,7 @@ ClassLiteral* Parser::ParseClassLiteral(ExpressionClassifier* classifier, if (fni_ != NULL) fni_->Infer(); - if (allow_harmony_function_name() && - property_name != ast_value_factory()->constructor_string()) { + if (property_name != ast_value_factory()->constructor_string()) { SetFunctionNameFromPropertyName(property, property_name); } } @@ -6571,8 +6566,6 @@ void ParserTraits::BuildIteratorClose(ZoneList* statements, void ParserTraits::FinalizeIteratorUse(Variable* completion, Expression* condition, Variable* iter, Block* iterator_use, Block* target) { - if (!FLAG_harmony_iterator_close) return; - // // This function adds two statements to [target], corresponding to the // following code: @@ -6855,8 +6848,6 @@ void ParserTraits::BuildIteratorCloseForCompletion( Statement* ParserTraits::FinalizeForOfStatement(ForOfStatement* loop, int pos) { - if (!FLAG_harmony_iterator_close) return loop; - // // This function replaces the loop with the following wrapping: // diff --git a/src/parsing/pattern-rewriter.cc b/src/parsing/pattern-rewriter.cc index 3dcff983c4..970231bc75 100644 --- a/src/parsing/pattern-rewriter.cc +++ b/src/parsing/pattern-rewriter.cc @@ -461,9 +461,7 @@ void Parser::PatternRewriter::VisitArrayLiteral(ArrayLiteral* node, // wrap this new block in a try-finally statement, restore block_ to its // original value, and add the try-finally statement to block_. auto target = block_; - if (FLAG_harmony_iterator_close) { - block_ = factory()->NewBlock(nullptr, 8, true, nopos); - } + block_ = factory()->NewBlock(nullptr, 8, true, nopos); Spread* spread = nullptr; for (Expression* value : *node->values()) { @@ -551,7 +549,7 @@ void Parser::PatternRewriter::VisitArrayLiteral(ArrayLiteral* node, block_->statements()->Add(if_not_done, zone()); if (!(value->IsLiteral() && value->AsLiteral()->raw_value()->IsTheHole())) { - if (FLAG_harmony_iterator_close) { + { // completion = kAbruptCompletion; Expression* proxy = factory()->NewVariableProxy(completion); Expression* assignment = factory()->NewAssignment( @@ -563,7 +561,7 @@ void Parser::PatternRewriter::VisitArrayLiteral(ArrayLiteral* node, RecurseIntoSubpattern(value, factory()->NewVariableProxy(v)); - if (FLAG_harmony_iterator_close) { + { // completion = kNormalCompletion; Expression* proxy = factory()->NewVariableProxy(completion); Expression* assignment = factory()->NewAssignment( @@ -676,13 +674,11 @@ void Parser::PatternRewriter::VisitArrayLiteral(ArrayLiteral* node, factory()->NewVariableProxy(array)); } - if (FLAG_harmony_iterator_close) { - Expression* closing_condition = factory()->NewUnaryOperation( - Token::NOT, factory()->NewVariableProxy(done), nopos); - parser_->FinalizeIteratorUse(completion, closing_condition, iterator, - block_, target); - block_ = target; - } + Expression* closing_condition = factory()->NewUnaryOperation( + Token::NOT, factory()->NewVariableProxy(done), nopos); + parser_->FinalizeIteratorUse(completion, closing_condition, iterator, block_, + target); + block_ = target; } diff --git a/src/parsing/scanner.cc b/src/parsing/scanner.cc index 23224db852..5fc848f58c 100644 --- a/src/parsing/scanner.cc +++ b/src/parsing/scanner.cc @@ -1453,7 +1453,6 @@ Maybe Scanner::ScanRegExpFlags() { flag = RegExp::kMultiline; break; case 'u': - if (!FLAG_harmony_unicode_regexps) return Nothing(); flag = RegExp::kUnicode; break; case 'y': diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc index d16fad8c1a..d8da0feade 100644 --- a/src/runtime/runtime-object.cc +++ b/src/runtime/runtime-object.cc @@ -725,7 +725,7 @@ RUNTIME_FUNCTION(Runtime_DefineDataPropertyInLiteral) { CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); CONVERT_SMI_ARG_CHECKED(set_function_name, 4); - if (FLAG_harmony_function_name && set_function_name) { + if (set_function_name) { DCHECK(value->IsJSFunction()); JSFunction::SetName(Handle::cast(value), name, isolate->factory()->empty_string()); @@ -794,8 +794,7 @@ RUNTIME_FUNCTION(Runtime_DefineGetterPropertyUnchecked) { CONVERT_ARG_HANDLE_CHECKED(JSFunction, getter, 2); CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); - if (FLAG_harmony_function_name && - String::cast(getter->shared()->name())->length() == 0) { + if (String::cast(getter->shared()->name())->length() == 0) { JSFunction::SetName(getter, name, isolate->factory()->get_string()); } @@ -815,8 +814,7 @@ RUNTIME_FUNCTION(Runtime_DefineSetterPropertyUnchecked) { CONVERT_ARG_HANDLE_CHECKED(JSFunction, setter, 2); CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); - if (FLAG_harmony_function_name && - String::cast(setter->shared()->name())->length() == 0) { + if (String::cast(setter->shared()->name())->length() == 0) { JSFunction::SetName(setter, name, isolate->factory()->set_string()); } diff --git a/src/v8.gyp b/src/v8.gyp index 301cc12660..d4bd7b0360 100644 --- a/src/v8.gyp +++ b/src/v8.gyp @@ -2086,11 +2086,8 @@ 'js/macros.py', 'messages.h', 'js/harmony-atomics.js', - 'js/harmony-regexp-exec.js', 'js/harmony-sharedarraybuffer.js', 'js/harmony-simd.js', - 'js/harmony-species.js', - 'js/harmony-unicode-regexps.js', 'js/harmony-string-padding.js', 'js/promise-extra.js', 'js/harmony-async-await.js' diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc index f8f2c0f636..5624e3fbca 100644 --- a/test/cctest/test-api.cc +++ b/test/cctest/test-api.cc @@ -18542,7 +18542,6 @@ THREADED_TEST(FunctionGetInferredName) { THREADED_TEST(FunctionGetDebugName) { - i::FLAG_harmony_function_name = true; LocalContext env; v8::HandleScope scope(env->GetIsolate()); const char* code = @@ -20077,7 +20076,6 @@ TEST(PersistentHandleInNewSpaceVisitor) { TEST(RegExp) { - i::FLAG_harmony_unicode_regexps = true; LocalContext context; v8::HandleScope scope(context->GetIsolate()); diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc index f07a333f63..071ab1840d 100644 --- a/test/cctest/test-regexp.cc +++ b/test/cctest/test-regexp.cc @@ -171,7 +171,6 @@ static MinMaxPair CheckMinMaxMatch(const char* input) { void TestRegExpParser(bool lookbehind) { FLAG_harmony_regexp_lookbehind = lookbehind; - FLAG_harmony_unicode_regexps = true; CHECK_PARSE_ERROR("?"); diff --git a/test/fuzzer/regexp.cc b/test/fuzzer/regexp.cc index 64c03aed8e..40e34707ac 100644 --- a/test/fuzzer/regexp.cc +++ b/test/fuzzer/regexp.cc @@ -30,7 +30,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { v8::Context::Scope context_scope(support->GetContext()); v8::TryCatch try_catch(isolate); - i::FLAG_harmony_unicode_regexps = true; i::FLAG_harmony_regexp_lookbehind = true; i::Isolate* i_isolate = reinterpret_cast(isolate); diff --git a/test/message/instanceof-noncallable.js b/test/message/instanceof-noncallable.js index 571a2b0c76..d82b416e68 100644 --- a/test/message/instanceof-noncallable.js +++ b/test/message/instanceof-noncallable.js @@ -25,6 +25,6 @@ // (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: --harmony-instanceof + 1 instanceof {}; diff --git a/test/message/instanceof-nonobject.js b/test/message/instanceof-nonobject.js index 47152571a1..ef8e0ae2e4 100644 --- a/test/message/instanceof-nonobject.js +++ b/test/message/instanceof-nonobject.js @@ -25,6 +25,6 @@ // (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: --harmony-instanceof + 1 instanceof 2; diff --git a/test/mjsunit/compiler/optimized-instanceof-1.js b/test/mjsunit/compiler/optimized-instanceof-1.js index 538b0ef524..242b4be772 100644 --- a/test/mjsunit/compiler/optimized-instanceof-1.js +++ b/test/mjsunit/compiler/optimized-instanceof-1.js @@ -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: --allow-natives-syntax --harmony-instanceof +// Flags: --allow-natives-syntax function F() {} var f = new F diff --git a/test/mjsunit/compiler/optimized-instanceof-2.js b/test/mjsunit/compiler/optimized-instanceof-2.js index 80bbdcd192..38a35b73f1 100644 --- a/test/mjsunit/compiler/optimized-instanceof-2.js +++ b/test/mjsunit/compiler/optimized-instanceof-2.js @@ -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: --allow-natives-syntax --harmony-instanceof +// Flags: --allow-natives-syntax function F() {} var f = new F diff --git a/test/mjsunit/harmony/array-species-constructor-accessor.js b/test/mjsunit/es6/array-species-constructor-accessor.js similarity index 94% rename from test/mjsunit/harmony/array-species-constructor-accessor.js rename to test/mjsunit/es6/array-species-constructor-accessor.js index 4c852f06f0..7ebf328a8a 100644 --- a/test/mjsunit/harmony/array-species-constructor-accessor.js +++ b/test/mjsunit/es6/array-species-constructor-accessor.js @@ -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-species --allow-natives-syntax +// Flags: --allow-natives-syntax // Overwriting the constructor of an instance updates the protector diff --git a/test/mjsunit/harmony/array-species-constructor-delete.js b/test/mjsunit/es6/array-species-constructor-delete.js similarity index 94% rename from test/mjsunit/harmony/array-species-constructor-delete.js rename to test/mjsunit/es6/array-species-constructor-delete.js index f341282dd9..fff22a2a8c 100644 --- a/test/mjsunit/harmony/array-species-constructor-delete.js +++ b/test/mjsunit/es6/array-species-constructor-delete.js @@ -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-species --allow-natives-syntax +// Flags: --allow-natives-syntax // Overwriting the constructor of an instance updates the protector diff --git a/test/mjsunit/harmony/array-species-constructor.js b/test/mjsunit/es6/array-species-constructor.js similarity index 94% rename from test/mjsunit/harmony/array-species-constructor.js rename to test/mjsunit/es6/array-species-constructor.js index d766e09eee..0d888f46ee 100644 --- a/test/mjsunit/harmony/array-species-constructor.js +++ b/test/mjsunit/es6/array-species-constructor.js @@ -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-species --allow-natives-syntax +// Flags: --allow-natives-syntax // Overwriting the constructor of an instance updates the protector diff --git a/test/mjsunit/harmony/array-species-delete.js b/test/mjsunit/es6/array-species-delete.js similarity index 94% rename from test/mjsunit/harmony/array-species-delete.js rename to test/mjsunit/es6/array-species-delete.js index ba49414069..16a2fa26f9 100644 --- a/test/mjsunit/harmony/array-species-delete.js +++ b/test/mjsunit/es6/array-species-delete.js @@ -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-species --allow-natives-syntax +// Flags: --allow-natives-syntax // Overwriting the constructor of an instance updates the protector diff --git a/test/mjsunit/harmony/array-species-modified.js b/test/mjsunit/es6/array-species-modified.js similarity index 94% rename from test/mjsunit/harmony/array-species-modified.js rename to test/mjsunit/es6/array-species-modified.js index 73c52b91a4..58feb31669 100644 --- a/test/mjsunit/harmony/array-species-modified.js +++ b/test/mjsunit/es6/array-species-modified.js @@ -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-species --allow-natives-syntax +// Flags: --allow-natives-syntax // Overwriting Array[Symbol.species] updates the protector diff --git a/test/mjsunit/harmony/array-species-parent-constructor.js b/test/mjsunit/es6/array-species-parent-constructor.js similarity index 94% rename from test/mjsunit/harmony/array-species-parent-constructor.js rename to test/mjsunit/es6/array-species-parent-constructor.js index 347732e1de..b4fb1d56e3 100644 --- a/test/mjsunit/harmony/array-species-parent-constructor.js +++ b/test/mjsunit/es6/array-species-parent-constructor.js @@ -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-species --allow-natives-syntax +// Flags: --allow-natives-syntax // Overwriting Array.prototype.constructor updates the protector diff --git a/test/mjsunit/harmony/array-species-proto.js b/test/mjsunit/es6/array-species-proto.js similarity index 94% rename from test/mjsunit/harmony/array-species-proto.js rename to test/mjsunit/es6/array-species-proto.js index 70db751519..6b55881cd6 100644 --- a/test/mjsunit/harmony/array-species-proto.js +++ b/test/mjsunit/es6/array-species-proto.js @@ -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-species --allow-natives-syntax +// Flags: --allow-natives-syntax // Overwriting an array instance's __proto__ updates the protector diff --git a/test/mjsunit/harmony/array-species.js b/test/mjsunit/es6/array-species.js similarity index 99% rename from test/mjsunit/harmony/array-species.js rename to test/mjsunit/es6/array-species.js index 19ed1d8185..25edf55104 100644 --- a/test/mjsunit/harmony/array-species.js +++ b/test/mjsunit/es6/array-species.js @@ -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-species - // Test the ES2015 @@species feature 'use strict'; diff --git a/test/mjsunit/harmony/arraybuffer-species.js b/test/mjsunit/es6/arraybuffer-species.js similarity index 97% rename from test/mjsunit/harmony/arraybuffer-species.js rename to test/mjsunit/es6/arraybuffer-species.js index 0445a4b648..1ac6efbe26 100644 --- a/test/mjsunit/harmony/arraybuffer-species.js +++ b/test/mjsunit/es6/arraybuffer-species.js @@ -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-species - // ArrayBuffer.prototype.slice makes subclass and checks length class MyArrayBuffer extends ArrayBuffer { } diff --git a/test/mjsunit/es6/classes-subclass-builtins.js b/test/mjsunit/es6/classes-subclass-builtins.js index 7669ef3a8a..dca514c294 100644 --- a/test/mjsunit/es6/classes-subclass-builtins.js +++ b/test/mjsunit/es6/classes-subclass-builtins.js @@ -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: --allow-natives-syntax --harmony-regexp-subclass -// Flags: --expose-gc +// Flags: --allow-natives-syntax --expose-gc "use strict"; diff --git a/test/mjsunit/es6/debug-step-into-regexp-subclass.js b/test/mjsunit/es6/debug-step-into-regexp-subclass.js index 599fe05715..5e5eb47d7f 100644 --- a/test/mjsunit/es6/debug-step-into-regexp-subclass.js +++ b/test/mjsunit/es6/debug-step-into-regexp-subclass.js @@ -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-regexp-subclass +// Flags: --expose-debug-as debug Debug = debug.Debug diff --git a/test/mjsunit/harmony/function-name.js b/test/mjsunit/es6/function-name.js similarity index 99% rename from test/mjsunit/harmony/function-name.js rename to test/mjsunit/es6/function-name.js index 66a69e0f16..152a63145d 100644 --- a/test/mjsunit/harmony/function-name.js +++ b/test/mjsunit/es6/function-name.js @@ -1,8 +1,6 @@ // 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-function-name (function testVariableDeclarationsFunction() { 'use strict'; diff --git a/test/mjsunit/harmony/instanceof-es6.js b/test/mjsunit/es6/instanceof.js similarity index 98% rename from test/mjsunit/harmony/instanceof-es6.js rename to test/mjsunit/es6/instanceof.js index 4971c9c76b..6bf225953f 100644 --- a/test/mjsunit/harmony/instanceof-es6.js +++ b/test/mjsunit/es6/instanceof.js @@ -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-instanceof - // Make sure it's an error if @@hasInstance isn't a function. (function() { var F = {}; diff --git a/test/mjsunit/harmony/iterator-close.js b/test/mjsunit/es6/iterator-close.js similarity index 99% rename from test/mjsunit/harmony/iterator-close.js rename to test/mjsunit/es6/iterator-close.js index 03cdeac038..1a96bee223 100644 --- a/test/mjsunit/harmony/iterator-close.js +++ b/test/mjsunit/es6/iterator-close.js @@ -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-iterator-close - function* g() { yield 42; return 88 }; diff --git a/test/mjsunit/es6/legacy-subclassing.js b/test/mjsunit/es6/legacy-subclassing.js deleted file mode 100644 index dbf666d07c..0000000000 --- a/test/mjsunit/es6/legacy-subclassing.js +++ /dev/null @@ -1,38 +0,0 @@ -// 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: --noharmony-species - -// Before Symbol.species was added, ArrayBuffer subclasses constructed -// ArrayBuffers, and Array subclasses constructed Arrays, but TypedArray and -// Promise subclasses constructed an instance of the subclass. - -'use strict'; - -assertEquals(undefined, Symbol.species); - -class MyArray extends Array { } -let myArray = new MyArray(); -assertEquals(MyArray, myArray.constructor); -assertEquals(Array, myArray.map(x => x + 1).constructor); -assertEquals(Array, myArray.concat().constructor); - -class MyUint8Array extends Uint8Array { } -Object.defineProperty(MyUint8Array.prototype, "BYTES_PER_ELEMENT", {value: 1}); -let myTypedArray = new MyUint8Array(3); -assertEquals(MyUint8Array, myTypedArray.constructor); -assertEquals(MyUint8Array, myTypedArray.map(x => x + 1).constructor); - -class MyArrayBuffer extends ArrayBuffer { } -let myBuffer = new MyArrayBuffer(0); -assertEquals(MyArrayBuffer, myBuffer.constructor); -assertEquals(ArrayBuffer, myBuffer.slice().constructor); - -class MyPromise extends Promise { } -let myPromise = new MyPromise(() => {}); -assertEquals(MyPromise, myPromise.constructor); -assertEquals(MyPromise, myPromise.then().constructor); - -// However, subarray instantiates members of the parent class -assertEquals(Uint8Array, myTypedArray.subarray(1).constructor); diff --git a/test/mjsunit/es6/no-unicode-regexp-flag.js b/test/mjsunit/es6/no-unicode-regexp-flag.js deleted file mode 100644 index 82d070e92d..0000000000 --- a/test/mjsunit/es6/no-unicode-regexp-flag.js +++ /dev/null @@ -1,24 +0,0 @@ -// 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. - -// Before Unicode RegExps are shipped, we shouldn't have the 'unicode' -// property on RegExp.prototype, or read it from 'flags'. -// mjsunit/es6/regexp-flags tests that the property is there when the -// flag is on. - -// Flags: --no-harmony-unicode-regexps - -'use strict'; - -assertFalse(RegExp.prototype.hasOwnProperty('unicode')); - -// If we were going to be really strict, we could have a test like this, -// with the assertTrue replaced by assertFalse, since flags shouldn't -// Get the 'unicode' property. However, it is probably OK to omit this -// detailed fix. -var x = /a/; -var y = false; -Object.defineProperty(x, 'unicode', { get() { y = true; } }); -assertEquals("", x.flags); -assertTrue(y); diff --git a/test/mjsunit/es6/pattern-brand-check.js b/test/mjsunit/es6/pattern-brand-check.js index 9b0c0111ef..2e3229481f 100644 --- a/test/mjsunit/es6/pattern-brand-check.js +++ b/test/mjsunit/es6/pattern-brand-check.js @@ -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-regexp-subclass - function createNonRegExp(calls) { return { get [Symbol.match]() { diff --git a/test/mjsunit/harmony/promise-species.js b/test/mjsunit/es6/promise-species.js similarity index 96% rename from test/mjsunit/harmony/promise-species.js rename to test/mjsunit/es6/promise-species.js index 12244f291a..f6f2e7a1b5 100644 --- a/test/mjsunit/harmony/promise-species.js +++ b/test/mjsunit/es6/promise-species.js @@ -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-species --allow-natives-syntax +// Flags: --allow-natives-syntax // Test that Promises use @@species appropriately diff --git a/test/mjsunit/es6/regexp-constructor.js b/test/mjsunit/es6/regexp-constructor.js index 559ac00cd0..b685ff2991 100644 --- a/test/mjsunit/es6/regexp-constructor.js +++ b/test/mjsunit/es6/regexp-constructor.js @@ -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-regexp-subclass - "use strict"; function should_not_be_called() { diff --git a/test/mjsunit/es6/regexp-flags.js b/test/mjsunit/es6/regexp-flags.js index 480222d95a..2bcccfa760 100644 --- a/test/mjsunit/es6/regexp-flags.js +++ b/test/mjsunit/es6/regexp-flags.js @@ -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-unicode-regexps - var r1 = /abc/gi; assertEquals("abc", r1.source); assertTrue(r1.global); diff --git a/test/mjsunit/harmony/species.js b/test/mjsunit/es6/species.js similarity index 98% rename from test/mjsunit/harmony/species.js rename to test/mjsunit/es6/species.js index da1df4331f..39156a4a2e 100644 --- a/test/mjsunit/harmony/species.js +++ b/test/mjsunit/es6/species.js @@ -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-species - // Test the ES2015 @@species feature 'use strict'; diff --git a/test/mjsunit/harmony/string-match.js b/test/mjsunit/es6/string-match.js similarity index 94% rename from test/mjsunit/harmony/string-match.js rename to test/mjsunit/es6/string-match.js index 25a3ca2fd1..2c7affe454 100644 --- a/test/mjsunit/harmony/string-match.js +++ b/test/mjsunit/es6/string-match.js @@ -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-regexp-subclass - var pattern = {}; pattern[Symbol.match] = function(string) { return string.length; diff --git a/test/mjsunit/harmony/string-replace.js b/test/mjsunit/es6/string-replace.js similarity index 94% rename from test/mjsunit/harmony/string-replace.js rename to test/mjsunit/es6/string-replace.js index 208c483fd0..0beb57a536 100644 --- a/test/mjsunit/harmony/string-replace.js +++ b/test/mjsunit/es6/string-replace.js @@ -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-regexp-subclass - var pattern = { [Symbol.replace]: (string, newValue) => string + newValue }; diff --git a/test/mjsunit/es6/string-search.js b/test/mjsunit/es6/string-search.js index dc029826ad..cbdf33d692 100644 --- a/test/mjsunit/es6/string-search.js +++ b/test/mjsunit/es6/string-search.js @@ -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-regexp-subclass - var pattern = {}; pattern[Symbol.search] = function(string) { return string.length; diff --git a/test/mjsunit/harmony/string-split.js b/test/mjsunit/es6/string-split.js similarity index 94% rename from test/mjsunit/harmony/string-split.js rename to test/mjsunit/es6/string-split.js index 1240d84bc1..8ca655cad9 100644 --- a/test/mjsunit/harmony/string-split.js +++ b/test/mjsunit/es6/string-split.js @@ -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-regexp-subclass - var pattern = {}; var limit = { value: 3 }; pattern[Symbol.split] = function(string, limit) { diff --git a/test/mjsunit/harmony/typedarray-species.js b/test/mjsunit/es6/typedarray-species.js similarity index 99% rename from test/mjsunit/harmony/typedarray-species.js rename to test/mjsunit/es6/typedarray-species.js index 35a9ea1de7..020d65c501 100644 --- a/test/mjsunit/harmony/typedarray-species.js +++ b/test/mjsunit/es6/typedarray-species.js @@ -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-species - // Subclasses of %TypedArray% construct themselves under map, etc var typedArrayConstructors = [ diff --git a/test/mjsunit/harmony/unicode-character-ranges.js b/test/mjsunit/es6/unicode-character-ranges.js similarity index 98% rename from test/mjsunit/harmony/unicode-character-ranges.js rename to test/mjsunit/es6/unicode-character-ranges.js index e4f5247c15..f39004fe97 100644 --- a/test/mjsunit/harmony/unicode-character-ranges.js +++ b/test/mjsunit/es6/unicode-character-ranges.js @@ -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-unicode-regexps --harmony-regexp-lookbehind +// Flags: --harmony-regexp-lookbehind function execl(expectation, regexp, subject) { if (regexp instanceof String) regexp = new RegExp(regexp, "u"); diff --git a/test/mjsunit/harmony/unicode-escapes-in-regexps.js b/test/mjsunit/es6/unicode-escapes-in-regexps.js similarity index 99% rename from test/mjsunit/harmony/unicode-escapes-in-regexps.js rename to test/mjsunit/es6/unicode-escapes-in-regexps.js index 7ea6f62990..2d2d11825d 100644 --- a/test/mjsunit/harmony/unicode-escapes-in-regexps.js +++ b/test/mjsunit/es6/unicode-escapes-in-regexps.js @@ -4,8 +4,6 @@ // ES6 extends the \uxxxx escape and also allows \u{xxxxx}. -// Flags: --harmony-unicode-regexps - function testRegexpHelper(r) { assertTrue(r.test("foo")); assertTrue(r.test("boo")); diff --git a/test/mjsunit/harmony/unicode-regexp-backrefs.js b/test/mjsunit/es6/unicode-regexp-backrefs.js similarity index 96% rename from test/mjsunit/harmony/unicode-regexp-backrefs.js rename to test/mjsunit/es6/unicode-regexp-backrefs.js index e02301be1e..56b9c5eb8c 100644 --- a/test/mjsunit/harmony/unicode-regexp-backrefs.js +++ b/test/mjsunit/es6/unicode-regexp-backrefs.js @@ -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-unicode-regexps --harmony-regexp-lookbehind +// Flags: --harmony-regexp-lookbehind // Back reference does not end in the middle of a surrogate pair. function replace(string) { diff --git a/test/mjsunit/harmony/unicode-regexp-ignore-case-noi18n.js b/test/mjsunit/es6/unicode-regexp-ignore-case-noi18n.js similarity index 98% rename from test/mjsunit/harmony/unicode-regexp-ignore-case-noi18n.js rename to test/mjsunit/es6/unicode-regexp-ignore-case-noi18n.js index a4cb9dc337..a99894234a 100644 --- a/test/mjsunit/harmony/unicode-regexp-ignore-case-noi18n.js +++ b/test/mjsunit/es6/unicode-regexp-ignore-case-noi18n.js @@ -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-unicode-regexps - // Non-unicode use toUpperCase mappings. assertFalse(/[\u00e5]/i.test("\u212b")); assertFalse(/[\u212b]/i.test("\u00e5\u1234")); diff --git a/test/mjsunit/harmony/unicode-regexp-ignore-case.js b/test/mjsunit/es6/unicode-regexp-ignore-case.js similarity index 98% rename from test/mjsunit/harmony/unicode-regexp-ignore-case.js rename to test/mjsunit/es6/unicode-regexp-ignore-case.js index 291b8662ff..dd02ca9d32 100644 --- a/test/mjsunit/harmony/unicode-regexp-ignore-case.js +++ b/test/mjsunit/es6/unicode-regexp-ignore-case.js @@ -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-unicode-regexps - // Non-unicode use toUpperCase mappings. assertFalse(/[\u00e5]/i.test("\u212b")); assertFalse(/[\u212b]/i.test("\u00e5\u1234")); diff --git a/test/mjsunit/harmony/unicode-regexp-last-index.js b/test/mjsunit/es6/unicode-regexp-last-index.js similarity index 98% rename from test/mjsunit/harmony/unicode-regexp-last-index.js rename to test/mjsunit/es6/unicode-regexp-last-index.js index 4a075d4380..67fbac7ef3 100644 --- a/test/mjsunit/harmony/unicode-regexp-last-index.js +++ b/test/mjsunit/es6/unicode-regexp-last-index.js @@ -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-unicode-regexps --harmony-regexp-lookbehind +// Flags: --harmony-regexp-lookbehind var r = /./ug; assertEquals(["\ud800\udc00"], r.exec("\ud800\udc00\ud801\udc01")); diff --git a/test/mjsunit/harmony/unicode-regexp-restricted-syntax.js b/test/mjsunit/es6/unicode-regexp-restricted-syntax.js similarity index 98% rename from test/mjsunit/harmony/unicode-regexp-restricted-syntax.js rename to test/mjsunit/es6/unicode-regexp-restricted-syntax.js index d129cc340e..dd4fa39ab5 100644 --- a/test/mjsunit/harmony/unicode-regexp-restricted-syntax.js +++ b/test/mjsunit/es6/unicode-regexp-restricted-syntax.js @@ -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-unicode-regexps - // test262/data/test/language/literals/regexp/u-dec-esc assertThrows("/\\1/u", SyntaxError); // test262/language/literals/regexp/u-invalid-char-range-a diff --git a/test/mjsunit/harmony/unicode-regexp-unanchored-advance.js b/test/mjsunit/es6/unicode-regexp-unanchored-advance.js similarity index 87% rename from test/mjsunit/harmony/unicode-regexp-unanchored-advance.js rename to test/mjsunit/es6/unicode-regexp-unanchored-advance.js index 97960e1cd3..c471122baf 100644 --- a/test/mjsunit/harmony/unicode-regexp-unanchored-advance.js +++ b/test/mjsunit/es6/unicode-regexp-unanchored-advance.js @@ -2,7 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --harmony-unicode-regexps - var s = "a".repeat(1E7) + "\u1234"; assertEquals(["\u1234", "\u1234"], /(\u1234)/u.exec(s)); diff --git a/test/mjsunit/harmony/unicode-regexp-zero-length.js b/test/mjsunit/es6/unicode-regexp-zero-length.js similarity index 98% rename from test/mjsunit/harmony/unicode-regexp-zero-length.js rename to test/mjsunit/es6/unicode-regexp-zero-length.js index bbc17dc2d5..42bb2d71dc 100644 --- a/test/mjsunit/harmony/unicode-regexp-zero-length.js +++ b/test/mjsunit/es6/unicode-regexp-zero-length.js @@ -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-unicode-regexps - var L = "\ud800"; var T = "\udc00"; var x = "x"; diff --git a/test/mjsunit/harmony/regexp-change-exec.js b/test/mjsunit/harmony/regexp-change-exec.js index 4c9757e3d5..ff84506d89 100644 --- a/test/mjsunit/harmony/regexp-change-exec.js +++ b/test/mjsunit/harmony/regexp-change-exec.js @@ -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-regexp-exec - class MyError extends Error { } RegExp.prototype.exec = () => { throw new MyError() }; assertThrows(() => "foo".match(/bar/), MyError); diff --git a/test/mjsunit/harmony/regexp-no-change-exec.js b/test/mjsunit/harmony/regexp-no-change-exec.js deleted file mode 100644 index 30b5050945..0000000000 --- a/test/mjsunit/harmony/regexp-no-change-exec.js +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2016 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: --no-harmony-regexp-exec - -class MyError extends Error { } -RegExp.prototype.exec = () => { throw new MyError() }; -assertEquals(null, "foo".match(/bar/)); diff --git a/test/mjsunit/harmony/regexp-property-binary.js b/test/mjsunit/harmony/regexp-property-binary.js index d0894b77f1..c0b4426d5e 100644 --- a/test/mjsunit/harmony/regexp-property-binary.js +++ b/test/mjsunit/harmony/regexp-property-binary.js @@ -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-regexp-property --harmony-unicode-regexps +// Flags: --harmony-regexp-property function t(re, s) { assertTrue(re.test(s)); } function f(re, s) { assertFalse(re.test(s)); } diff --git a/test/mjsunit/harmony/regexp-property-blocks.js b/test/mjsunit/harmony/regexp-property-blocks.js index f41c06e4eb..de3fd1e276 100644 --- a/test/mjsunit/harmony/regexp-property-blocks.js +++ b/test/mjsunit/harmony/regexp-property-blocks.js @@ -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-regexp-property --harmony-unicode-regexps +// Flags: --harmony-regexp-property function t(re, s) { assertTrue(re.test(s)); } function f(re, s) { assertFalse(re.test(s)); } diff --git a/test/mjsunit/harmony/regexp-property-char-class.js b/test/mjsunit/harmony/regexp-property-char-class.js index 6162012dc6..c70e82676e 100644 --- a/test/mjsunit/harmony/regexp-property-char-class.js +++ b/test/mjsunit/harmony/regexp-property-char-class.js @@ -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-unicode-regexps --harmony-regexp-property +// Flags: --harmony-regexp-property assertThrows("/[\\p]/u"); assertThrows("/[\\p{garbage}]/u"); diff --git a/test/mjsunit/harmony/regexp-property-disabled.js b/test/mjsunit/harmony/regexp-property-disabled.js index 7a3158c68b..f471ef4d9d 100644 --- a/test/mjsunit/harmony/regexp-property-disabled.js +++ b/test/mjsunit/harmony/regexp-property-disabled.js @@ -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-unicode-regexps --no-harmony-regexp-property +// Flags: --no-harmony-regexp-property function test(source, message) { try { diff --git a/test/mjsunit/harmony/regexp-property-enumerated.js b/test/mjsunit/harmony/regexp-property-enumerated.js index e4a81a4e43..dba8397e78 100644 --- a/test/mjsunit/harmony/regexp-property-enumerated.js +++ b/test/mjsunit/harmony/regexp-property-enumerated.js @@ -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-regexp-property --harmony-unicode-regexps +// Flags: --harmony-regexp-property function t(re, s) { assertTrue(re.test(s)); } function f(re, s) { assertFalse(re.test(s)); } diff --git a/test/mjsunit/harmony/regexp-property-exact-match.js b/test/mjsunit/harmony/regexp-property-exact-match.js index f36ba1d52a..0d1f70459e 100644 --- a/test/mjsunit/harmony/regexp-property-exact-match.js +++ b/test/mjsunit/harmony/regexp-property-exact-match.js @@ -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-regexp-property --harmony-unicode-regexps +// Flags: --harmony-regexp-property assertThrows("/\\p{In CJK}/u"); assertThrows("/\\p{InCJKUnifiedIdeographs}/u"); diff --git a/test/mjsunit/harmony/regexp-property-general-category.js b/test/mjsunit/harmony/regexp-property-general-category.js index 03a526844d..e4fb8b5232 100644 --- a/test/mjsunit/harmony/regexp-property-general-category.js +++ b/test/mjsunit/harmony/regexp-property-general-category.js @@ -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-regexp-property --harmony-unicode-regexps +// Flags: --harmony-regexp-property assertThrows("/\\p/u"); assertThrows("/\\p{garbage}/u"); diff --git a/test/mjsunit/harmony/regexp-property-lu-ui.js b/test/mjsunit/harmony/regexp-property-lu-ui.js index 56ec53d2f4..115e064005 100644 --- a/test/mjsunit/harmony/regexp-property-lu-ui.js +++ b/test/mjsunit/harmony/regexp-property-lu-ui.js @@ -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-regexp-property --harmony-unicode-regexps +// Flags: --harmony-regexp-property const regexp = /\P{Lu}/ui; const regexpu = /[\0-@\[-\xBF\xD7\xDF-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9-\u01BB\u01BD-\u01C3\u01C5\u01C6\u01C8\u01C9\u01CB\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F2\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u036F\u0371\u0373-\u0375\u0377-\u037E\u0380-\u0385\u0387\u038B\u038D\u0390\u03A2\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F6\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481-\u0489\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0530\u0557-\u109F\u10C6\u10C8-\u10CC\u10CE-\u139F\u13F6-\u1DFF\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F17\u1F1E-\u1F27\u1F30-\u1F37\u1F40-\u1F47\u1F4E-\u1F58\u1F5A\u1F5C\u1F5E\u1F60-\u1F67\u1F70-\u1FB7\u1FBC-\u1FC7\u1FCC-\u1FD7\u1FDC-\u1FE7\u1FED-\u1FF7\u1FFC-\u2101\u2103-\u2106\u2108-\u210A\u210E\u210F\u2113\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u212F\u2134-\u213D\u2140-\u2144\u2146-\u2182\u2184-\u2BFF\u2C2F-\u2C5F\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7D\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3-\u2CEA\u2CEC\u2CEE-\u2CF1\u2CF3-\uA63F\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D-\uA67F\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B-\uA721\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787-\uA78A\uA78C\uA78E\uA78F\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AE\uA7AF\uA7B5\uA7B7-\uFF20\uFF3B-\u{103FF}\u{10428}-\u{10C7F}\u{10CB3}-\u{1189F}\u{118C0}-\u{1D3FF}\u{1D41A}-\u{1D433}\u{1D44E}-\u{1D467}\u{1D482}-\u{1D49B}\u{1D49D}\u{1D4A0}\u{1D4A1}\u{1D4A3}\u{1D4A4}\u{1D4A7}\u{1D4A8}\u{1D4AD}\u{1D4B6}-\u{1D4CF}\u{1D4EA}-\u{1D503}\u{1D506}\u{1D50B}\u{1D50C}\u{1D515}\u{1D51D}-\u{1D537}\u{1D53A}\u{1D53F}\u{1D545}\u{1D547}-\u{1D549}\u{1D551}-\u{1D56B}\u{1D586}-\u{1D59F}\u{1D5BA}-\u{1D5D3}\u{1D5EE}-\u{1D607}\u{1D622}-\u{1D63B}\u{1D656}-\u{1D66F}\u{1D68A}-\u{1D6A7}\u{1D6C1}-\u{1D6E1}\u{1D6FB}-\u{1D71B}\u{1D735}-\u{1D755}\u{1D76F}-\u{1D78F}\u{1D7A9}-\u{1D7C9}\u{1D7CB}-\u{10FFFF}]/ui; diff --git a/test/mjsunit/harmony/regexp-property-scripts.js b/test/mjsunit/harmony/regexp-property-scripts.js index ec2b11da7b..565a59ab0a 100644 --- a/test/mjsunit/harmony/regexp-property-scripts.js +++ b/test/mjsunit/harmony/regexp-property-scripts.js @@ -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-regexp-property --harmony-unicode-regexps +// Flags: --harmony-regexp-property function t(re, s) { assertTrue(re.test(s)); } function f(re, s) { assertFalse(re.test(s)); } diff --git a/test/mjsunit/harmony/regexp-property-special.js b/test/mjsunit/harmony/regexp-property-special.js index 99ffe07498..204b77fb23 100644 --- a/test/mjsunit/harmony/regexp-property-special.js +++ b/test/mjsunit/harmony/regexp-property-special.js @@ -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-regexp-property --harmony-unicode-regexps +// Flags: --harmony-regexp-property function t(re, s) { assertTrue(re.test(s)); } function f(re, s) { assertFalse(re.test(s)); } diff --git a/test/mjsunit/messages.js b/test/mjsunit/messages.js index d40994d849..30abc197e9 100644 --- a/test/mjsunit/messages.js +++ b/test/mjsunit/messages.js @@ -3,7 +3,7 @@ // found in the LICENSE file. // Flags: --stack-size=100 --harmony -// Flags: --harmony-simd --harmony-instanceof +// Flags: --harmony-simd function test(f, expected, type) { try { diff --git a/test/mjsunit/mirror-regexp.js b/test/mjsunit/mirror-regexp.js index 7aae1c62ec..0711ff95ae 100644 --- a/test/mjsunit/mirror-regexp.js +++ b/test/mjsunit/mirror-regexp.js @@ -25,7 +25,7 @@ // (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: --expose-debug-as debug --harmony-unicode-regexps +// Flags: --expose-debug-as debug // Test the mirror object for regular expression values var dont_enum = debug.PropertyAttribute.DontEnum; diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status index f597d79094..54a8b46486 100644 --- a/test/mjsunit/mjsunit.status +++ b/test/mjsunit/mjsunit.status @@ -268,8 +268,8 @@ 'wasm/embenchen/*': [PASS, ['arch == arm64', SKIP], ['ignition == True', SKIP]], # case-insensitive unicode regexp relies on case mapping provided by ICU. - 'harmony/unicode-regexp-ignore-case': [PASS, ['no_i18n == True', FAIL]], - 'harmony/unicode-regexp-ignore-case-noi18n': [FAIL, ['no_i18n == True', PASS]], + 'es6/unicode-regexp-ignore-case': [PASS, ['no_i18n == True', FAIL]], + 'es6/unicode-regexp-ignore-case-noi18n': [FAIL, ['no_i18n == True', PASS]], 'regress/regress-5036': [PASS, ['no_i18n == True', FAIL]], # desugaring regexp property class relies on ICU. 'harmony/regexp-property-*': [PASS, ['no_i18n == True', FAIL]], diff --git a/test/mjsunit/object-literal.js b/test/mjsunit/object-literal.js index 19860ff389..b861d443c0 100644 --- a/test/mjsunit/object-literal.js +++ b/test/mjsunit/object-literal.js @@ -24,8 +24,6 @@ // 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: --harmony-function-name var obj = { a: 7, diff --git a/test/mjsunit/regexp-string-methods.js b/test/mjsunit/regexp-string-methods.js index fa01a33ce4..d5ad9c3386 100644 --- a/test/mjsunit/regexp-string-methods.js +++ b/test/mjsunit/regexp-string-methods.js @@ -25,8 +25,6 @@ // (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: --no-harmony-regexp-exec - // Regexp shouldn't use String.prototype.slice() var s = new String("foo"); assertEquals("f", s.slice(0,1)); @@ -43,11 +41,3 @@ assertEquals("g", "foo".charAt(0)); var f2 = new RegExp("[g]", "i"); assertEquals(["G"], f2.exec("G")); assertTrue(f2.ignoreCase); - -// On the other hand test is defined in a semi-coherent way as a call to exec. -// 15.10.6.3 -// We match other browsers in using the original value of RegExp.prototype.exec. -// I.e., RegExp.prototype.test shouldn't use the current value of -// RegExp.prototype.exec. -RegExp.prototype.exec = function(string) { return 'x'; }; -assertFalse(/f/.test('x')); diff --git a/test/mjsunit/regress/regress-4659.js b/test/mjsunit/regress/regress-4659.js index ff436bec1b..8992bb89fe 100644 --- a/test/mjsunit/regress/regress-4659.js +++ b/test/mjsunit/regress/regress-4659.js @@ -1,8 +1,6 @@ // Copyright 2016 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-function-name var obj = { get longerName(){ diff --git a/test/mjsunit/regress/regress-4665-2.js b/test/mjsunit/regress/regress-4665-2.js deleted file mode 100644 index b94301eea8..0000000000 --- a/test/mjsunit/regress/regress-4665-2.js +++ /dev/null @@ -1,33 +0,0 @@ -// 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-species - -// First test case - -function FirstBuffer () {} -FirstBuffer.prototype.__proto__ = Uint8Array.prototype -FirstBuffer.__proto__ = Uint8Array - -var buf = new Uint8Array(10) -buf.__proto__ = FirstBuffer.prototype - -var buf2 = buf.subarray(2) -assertEquals(8, buf2.length); - -// Second test case - -function SecondBuffer (arg) { - var arr = new Uint8Array(arg) - arr.__proto__ = SecondBuffer.prototype - return arr -} -SecondBuffer.prototype.__proto__ = Uint8Array.prototype -SecondBuffer.__proto__ = Uint8Array - -var buf3 = new SecondBuffer(10) - -var buf4 = buf3.subarray(2) - -assertEquals(8, buf4.length); diff --git a/test/mjsunit/regress/regress-4665.js b/test/mjsunit/regress/regress-4665.js index 9d7307acc7..a75d68f105 100644 --- a/test/mjsunit/regress/regress-4665.js +++ b/test/mjsunit/regress/regress-4665.js @@ -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: --noharmony-species - // First test case function FirstBuffer () {} diff --git a/test/mjsunit/regress/regress-5036.js b/test/mjsunit/regress/regress-5036.js index 036edd949f..77bd242490 100644 --- a/test/mjsunit/regress/regress-5036.js +++ b/test/mjsunit/regress/regress-5036.js @@ -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-unicode-regexps - assertEquals(["1\u212a"], /\d\w/ui.exec("1\u212a")); diff --git a/test/mjsunit/regress/regress-544991.js b/test/mjsunit/regress/regress-544991.js index 911d8acc89..a9fd809a3b 100644 --- a/test/mjsunit/regress/regress-544991.js +++ b/test/mjsunit/regress/regress-544991.js @@ -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-species - 'use strict'; var typedArray = new Int8Array(1); diff --git a/test/mjsunit/regress/regress-crbug-600995.js b/test/mjsunit/regress/regress-crbug-600995.js deleted file mode 100644 index c532608799..0000000000 --- a/test/mjsunit/regress/regress-crbug-600995.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2016 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: --noharmony-iterator-close - -// The {Set} function will produce a different type feedback vector layout -// depending on whether Harmony iterator finalization is enabled or not. - -new Set(); diff --git a/test/mjsunit/regress/regress-crbug-605862.js b/test/mjsunit/regress/regress-crbug-605862.js index 3124c0647f..82a5d454ec 100644 --- a/test/mjsunit/regress/regress-crbug-605862.js +++ b/test/mjsunit/regress/regress-crbug-605862.js @@ -2,7 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --harmony-unicode-regexps - /[]*1/u.exec("\u1234"); /[^\u0000-\u{10ffff}]*1/u.exec("\u1234"); diff --git a/test/webkit/exception-for-nonobject.js b/test/webkit/exception-for-nonobject.js index f54915eb2e..d39c3e0512 100644 --- a/test/webkit/exception-for-nonobject.js +++ b/test/webkit/exception-for-nonobject.js @@ -21,8 +21,6 @@ // (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: --harmony-instanceof - description("Test for correct handling of exceptions from instanceof and 'new' expressions"); shouldThrow("new {}.undefined"); diff --git a/test/webkit/instance-of-immediates.js b/test/webkit/instance-of-immediates.js index be63e4b00b..649a29f5a4 100644 --- a/test/webkit/instance-of-immediates.js +++ b/test/webkit/instance-of-immediates.js @@ -21,8 +21,6 @@ // (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: --harmony-instanceof - description('This test makes sure that instance of behaves correctly when the value, constructor, or its prototype are immediates.'); // A Constructor to use check for instances of, and an instance called obj.