Commit 7462e996 authored by adamk's avatar adamk Committed by Commit bot

Remove on-by-default flag --harmony-object

It's been enabled since M45, which is now well into its stable period,
with no problems reported.

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

Cr-Commit-Position: refs/heads/master@{#30835}
parent bdf5b39f
......@@ -321,7 +321,6 @@ action("js2c_experimental") {
"src/harmony-regexp.js",
"src/harmony-reflect.js",
"src/harmony-spread.js",
"src/harmony-object.js",
"src/harmony-object-observe.js",
"src/harmony-sharedarraybuffer.js",
"src/harmony-simd.js"
......
......@@ -1859,7 +1859,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_default_parameters)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target)
......@@ -2556,8 +2555,6 @@ bool Genesis::InstallExperimentalNatives() {
static const char* harmony_spreadcalls_natives[] = {
"native harmony-spread.js", nullptr};
static const char* harmony_destructuring_natives[] = {nullptr};
static const char* harmony_object_natives[] = {"native harmony-object.js",
NULL};
static const char* harmony_object_observe_natives[] = {
"native harmony-object-observe.js", nullptr};
static const char* harmony_spread_arrays_natives[] = {nullptr};
......
......@@ -216,8 +216,7 @@ DEFINE_BOOL(legacy_const, true, "legacy semantics for const in sloppy mode")
V(harmony_new_target, "harmony new.target") \
V(harmony_object_observe, "harmony Object.observe") \
V(harmony_spreadcalls, "harmony spread-calls") \
V(harmony_spread_arrays, "harmony spread in array literals") \
V(harmony_object, "harmony Object methods")
V(harmony_spread_arrays, "harmony spread in array literals")
// Once a shipping feature has proved stable in the wild, it will be dropped
// from HARMONY_SHIPPING, all occurrences of the FLAG_ variable are removed,
......
// 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 GlobalObject = global.Object;
var OwnPropertyKeys;
utils.Import(function(from) {
OwnPropertyKeys = from.OwnPropertyKeys;
});
// -------------------------------------------------------------------
// ES6, draft 04-03-15, section 19.1.2.1
function ObjectAssign(target, sources) {
var to = TO_OBJECT(target);
var argsLen = %_ArgumentsLength();
if (argsLen < 2) return to;
for (var i = 1; i < argsLen; ++i) {
var nextSource = %_Arguments(i);
if (IS_NULL_OR_UNDEFINED(nextSource)) {
continue;
}
var from = TO_OBJECT(nextSource);
var keys = OwnPropertyKeys(from);
var len = keys.length;
for (var j = 0; j < len; ++j) {
var key = keys[j];
if (%IsPropertyEnumerable(from, key)) {
var propValue = from[key];
to[key] = propValue;
}
}
}
return to;
}
// Set up non-enumerable functions on the Object object.
utils.InstallFunctions(GlobalObject, DONT_ENUM, [
"assign", ObjectAssign
]);
})
......@@ -1262,6 +1262,36 @@ function ObjectIs(obj1, obj2) {
}
// ECMA-262, Edition 6, section 19.1.2.1
function ObjectAssign(target, sources) {
// TODO(bmeurer): Move this to toplevel.
"use strict";
var to = TO_OBJECT(target);
var argsLen = %_ArgumentsLength();
if (argsLen < 2) return to;
for (var i = 1; i < argsLen; ++i) {
var nextSource = %_Arguments(i);
if (IS_NULL_OR_UNDEFINED(nextSource)) {
continue;
}
var from = TO_OBJECT(nextSource);
var keys = OwnPropertyKeys(from);
var len = keys.length;
for (var j = 0; j < len; ++j) {
var key = keys[j];
if (%IsPropertyEnumerable(from, key)) {
var propValue = from[key];
to[key] = propValue;
}
}
}
return to;
}
// ECMA-262, Edition 6, section B.2.2.1.1
function ObjectGetProto() {
return %_GetPrototype(TO_OBJECT(this));
......@@ -1316,6 +1346,7 @@ utils.InstallGetterSetter(GlobalObject.prototype, "__proto__", ObjectGetProto,
// Set up non-enumerable functions in the Object object.
utils.InstallFunctions(GlobalObject, DONT_ENUM, [
"assign", ObjectAssign,
"keys", ObjectKeys,
"create", ObjectCreate,
"defineProperty", ObjectDefineProperty,
......@@ -1808,7 +1839,6 @@ utils.Export(function(to) {
to.ObjectIsFrozen = ObjectIsFrozen;
to.ObjectIsSealed = ObjectIsSealed;
to.ObjectToString = ObjectToString;
to.OwnPropertyKeys = OwnPropertyKeys;
to.ToNameArray = ToNameArray;
});
......
......@@ -113,7 +113,6 @@
"path": ["Object"],
"main": "run.js",
"resources": ["assign.js"],
"flags": ["--harmony-object"],
"results_regexp": "^%s\\-Object\\(Score\\): (.+)$",
"tests": [
{"name": "Assign"}
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-object
// Based on Mozilla Object.assign() tests
function checkDataProperty(object, propertyKey, value, writable, enumerable, configurable) {
......
{
"flags": [
"--harmony-object",
"--harmony-simd",
"test/simdjs/harness-adapt.js"
],
......
......@@ -40,7 +40,7 @@ output = {
'test/simdjs/harness-adapt.js',
'test/simdjs/harness-finish.js'
] + ['test/simdjs/data/src/benchmarks/%s.js' % t for t in tests],
'flags': ['--harmony-object', 'test/simdjs/harness-adapt.js'],
'flags': ['test/simdjs/harness-adapt.js'],
'path': ['../../'],
'tests': [
{
......
......@@ -1852,7 +1852,6 @@
'../../src/harmony-regexp.js',
'../../src/harmony-reflect.js',
'../../src/harmony-spread.js',
'../../src/harmony-object.js',
'../../src/harmony-object-observe.js',
'../../src/harmony-sharedarraybuffer.js',
'../../src/harmony-simd.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