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}
This commit is contained in:
adamk 2016-06-23 18:11:08 -07:00 committed by Commit bot
parent f788bd9cce
commit c7eb436d09
93 changed files with 179 additions and 577 deletions

View File

@ -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",
]

View File

@ -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<Context> 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<JSFunction> Genesis::InstallArrayBuffer(Handle<JSObject> target,
}
void Genesis::InitializeGlobal_harmony_species() {
if (!FLAG_harmony_species) return;
InstallPublicSymbol(factory(), native_context(), "species",
factory()->species_symbol());
}
Handle<JSFunction> Genesis::InstallInternalArray(Handle<JSObject> 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};

View File

@ -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

View File

@ -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);
}

View File

@ -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(

View File

@ -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

View File

@ -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);

View File

@ -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, [

View File

@ -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);
})

View File

@ -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);
});

View File

@ -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);
})

View File

@ -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

View File

@ -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;
});

View File

@ -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);
}
//----------------------------------------------------------------------------

View File

@ -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,

View File

@ -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, [

View File

@ -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();
}
}

View File

@ -265,13 +265,11 @@ Handle<Object> CallSite::GetMethodName() {
Handle<Name> name = Handle<Name>::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<String> name_string = Handle<String>::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<String> name_string = Handle<String>::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)) {

View File

@ -614,30 +614,28 @@ MaybeHandle<Object> Object::OrdinaryHasInstance(Isolate* isolate,
// static
MaybeHandle<Object> Object::InstanceOf(Isolate* isolate, Handle<Object> object,
Handle<Object> 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<Object> inst_of_handler;
// Lookup the @@hasInstance method on {callable}.
Handle<Object> inst_of_handler;
ASSIGN_RETURN_ON_EXCEPTION(
isolate, inst_of_handler,
JSReceiver::GetMethod(Handle<JSReceiver>::cast(callable),
isolate->factory()->has_instance_symbol()),
Object);
if (!inst_of_handler->IsUndefined(isolate)) {
// Call the {inst_of_handler} on the {callable}.
Handle<Object> result;
ASSIGN_RETURN_ON_EXCEPTION(
isolate, inst_of_handler,
JSReceiver::GetMethod(Handle<JSReceiver>::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<Object> 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> Object::ArraySpeciesConstructor(
Isolate* isolate, Handle<Object> original_array) {
Handle<Object> default_species = isolate->array_function();
if (!FLAG_harmony_species) {
return default_species;
}
if (original_array->IsJSArray() &&
Handle<JSArray>::cast(original_array)->HasArrayPrototype(isolate) &&
isolate->IsArraySpeciesLookupChainIntact()) {
@ -15830,7 +15825,6 @@ JSRegExp::Flags RegExpFlagsFromString(Handle<String> flags, bool* success) {
flag = JSRegExp::kMultiline;
break;
case 'u':
if (!FLAG_harmony_unicode_regexps) return JSRegExp::Flags(0);
flag = JSRegExp::kUnicode;
break;
case 'y':

View File

@ -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<Traits>::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<Traits>::ExpressionT ParserBase<Traits>::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<Traits>::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<Traits>::ParseFormalParameter(
init_classifier.Discard();
classifier->RecordNonSimpleParameter();
if (allow_harmony_function_name()) {
Traits::SetFunctionNameFromIdentifierRef(initializer, pattern);
}
Traits::SetFunctionNameFromIdentifierRef(initializer, pattern);
}
Traits::AddFormalParameter(parameters, pattern, initializer,

View File

@ -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<Statement*>* 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:
//

View File

@ -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;
}

View File

@ -1453,7 +1453,6 @@ Maybe<RegExp::Flags> Scanner::ScanRegExpFlags() {
flag = RegExp::kMultiline;
break;
case 'u':
if (!FLAG_harmony_unicode_regexps) return Nothing<RegExp::Flags>();
flag = RegExp::kUnicode;
break;
case 'y':

View File

@ -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<JSFunction>::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());
}

View File

@ -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'

View File

@ -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());

View File

@ -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("?");

View File

@ -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<i::Isolate*>(isolate);

View File

@ -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 {};

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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';

View File

@ -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 { }

View File

@ -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";

View File

@ -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

View File

@ -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';

View File

@ -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 = {};

View File

@ -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 };

View File

@ -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);

View File

@ -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);

View File

@ -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]() {

View File

@ -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

View File

@ -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() {

View File

@ -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);

View File

@ -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';

View File

@ -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;

View File

@ -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
};

View File

@ -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;

View File

@ -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) {

View File

@ -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 = [

View File

@ -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");

View File

@ -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"));

View File

@ -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) {

View File

@ -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"));

View File

@ -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"));

View File

@ -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"));

View File

@ -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

View File

@ -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));

View File

@ -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";

View File

@ -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);

View File

@ -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/));

View File

@ -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)); }

View File

@ -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)); }

View File

@ -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");

View File

@ -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 {

View File

@ -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)); }

View File

@ -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");

View File

@ -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");

View File

@ -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;

View File

@ -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)); }

View File

@ -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)); }

View File

@ -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 {

View File

@ -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;

View File

@ -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]],

View File

@ -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,

View File

@ -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'));

View File

@ -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(){

View File

@ -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);

View File

@ -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 () {}

View File

@ -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"));

View File

@ -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);

View File

@ -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();

View File

@ -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");

View File

@ -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");

View File

@ -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.