Commit a1dcac3d authored by littledan's avatar littledan Committed by Commit bot

Include Harmony Array/TypedArray methods unconditionally

Conditionally including Array and TypedArray methods seems to cause
a slowdown in V8 context creation, possibly due to the new code added.

BUG=chromium:504629
R=adamk@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#29430}
parent a5221d07
......@@ -231,6 +231,8 @@ action("js2c") {
"src/mirror-debugger.js",
"src/liveedit-debugger.js",
"src/templates.js",
"src/harmony-array.js",
"src/harmony-typedarray.js",
]
outputs = [
......@@ -270,9 +272,7 @@ action("js2c_experimental") {
"src/proxy.js",
"src/generator.js",
"src/harmony-atomics.js",
"src/harmony-array.js",
"src/harmony-array-includes.js",
"src/harmony-typedarray.js",
"src/harmony-tostring.js",
"src/harmony-regexp.js",
"src/harmony-reflect.js",
......
......@@ -1798,7 +1798,6 @@ void Genesis::InitializeBuiltinTypedArrays() {
void Genesis::InstallNativeFunctions_##id() {}
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_modules)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrays)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_array_includes)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions)
......@@ -1834,7 +1833,6 @@ void Genesis::InstallNativeFunctions_harmony_proxies() {
void Genesis::InitializeGlobal_##id() {}
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
......@@ -2464,8 +2462,6 @@ bool Genesis::InstallNatives() {
bool Genesis::InstallExperimentalNatives() {
static const char* harmony_arrays_natives[] = {
"native harmony-array.js", "native harmony-typedarray.js", nullptr};
static const char* harmony_array_includes_natives[] = {
"native harmony-array-includes.js", nullptr};
static const char* harmony_proxies_natives[] = {"native proxy.js", nullptr};
......
......@@ -202,7 +202,6 @@ DEFINE_IMPLICATION(es_staging, harmony)
// Features that are shipping (turned on by default, but internal flag remains).
#define HARMONY_SHIPPING(V) \
V(harmony_arrays, "harmony array methods") \
V(harmony_arrow_functions, "harmony arrow functions") \
V(harmony_computed_property_names, "harmony computed property names") \
V(harmony_spreadcalls, "harmony spread-calls") \
......
......@@ -726,15 +726,13 @@ static bool IterateElements(Isolate* isolate, Handle<JSObject> receiver,
static bool IsConcatSpreadable(Isolate* isolate, Handle<Object> obj) {
HandleScope handle_scope(isolate);
if (!obj->IsSpecObject()) return false;
if (FLAG_harmony_arrays) {
Handle<Symbol> key(isolate->factory()->is_concat_spreadable_symbol());
Handle<Object> value;
MaybeHandle<Object> maybeValue =
i::Runtime::GetObjectProperty(isolate, obj, key);
if (maybeValue.ToHandle(&value)) {
if (!value->IsUndefined()) {
return value->BooleanValue();
}
Handle<Symbol> key(isolate->factory()->is_concat_spreadable_symbol());
Handle<Object> value;
MaybeHandle<Object> maybeValue =
i::Runtime::GetObjectProperty(isolate, obj, key);
if (maybeValue.ToHandle(&value)) {
if (!value->IsUndefined()) {
return value->BooleanValue();
}
}
return obj->IsJSArray();
......
......@@ -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-arrays
var typedArrayConstructors = [
Uint8Array,
Int8Array,
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-arrays --allow-natives-syntax
// Flags: --allow-natives-syntax
var typedArrayConstructors = [
Uint8Array,
......
......@@ -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-arrays
var typedArrayConstructors = [
Uint8Array,
Int8Array,
......
......@@ -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-arrays
var typedArrayConstructors = [
Uint8Array,
Int8Array,
......
......@@ -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-arrays
var typedArrayConstructors = [
Uint8Array,
Int8Array,
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-arrays --allow-natives-syntax
// Flags: --allow-natives-syntax
var typedArrayConstructors = [
Uint8Array,
......
......@@ -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-arrays
var typedArrayConstructors = [
Uint8Array,
Int8Array,
......
......@@ -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-arrays
var typedArrayConstructors = [
Uint8Array,
Int8Array,
......
......@@ -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-arrays
// Tests for standard TypedArray array iteration functions.
var typedArrayConstructors = [
......
......@@ -4,8 +4,6 @@
// Based on Mozilla Array.of() tests at http://dxr.mozilla.org/mozilla-central/source/js/src/jit-test/tests/collections
// Flags: --harmony-arrays
var typedArrayConstructors = [
Uint8Array,
Int8Array,
......
......@@ -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-arrays
// Test that the methods for different TypedArray types have the same
// identity.
// TODO(dehrenberg): Test that the TypedArray proto hierarchy is set
......
......@@ -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-arrays
var typedArrayConstructors = [
Uint8Array,
Int8Array,
......
......@@ -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-arrays
function ArrayMaker(x) {
return x;
}
......
......@@ -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-arrays
var typedArrayConstructors = [
Uint8Array,
Int8Array,
......
......@@ -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-arrays
var typedArrayConstructors = [
Uint8Array,
Int8Array,
......
......@@ -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-arrays
// Array's toString should call the object's own join method, if one exists and
// is callable. Otherwise, just use the original Object.toString function.
......
......@@ -1770,6 +1770,8 @@
'../../src/mirror-debugger.js',
'../../src/liveedit-debugger.js',
'../../src/templates.js',
'../../src/harmony-array.js',
'../../src/harmony-typedarray.js',
],
'experimental_library_files': [
'../../src/macros.py',
......@@ -1777,10 +1779,8 @@
'../../src/proxy.js',
'../../src/generator.js',
'../../src/harmony-atomics.js',
'../../src/harmony-array.js',
'../../src/harmony-array-includes.js',
'../../src/harmony-tostring.js',
'../../src/harmony-typedarray.js',
'../../src/harmony-regexp.js',
'../../src/harmony-reflect.js',
'../../src/harmony-spread.js',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment