Backed out 2 changesets (bug 1558914) for SM bustages on Array.slice . CLOSED TREE

Backed out changeset ac7ca81ef7c6 (bug 1558914)
Backed out changeset e7fbcb7b6694 (bug 1558914)
This commit is contained in:
shindli 2019-07-01 19:02:49 +03:00
Родитель 8152cee1b1
Коммит d8e8b80c16
16 изменённых файлов: 53 добавлений и 22 удалений

Просмотреть файл

@ -116,7 +116,7 @@ const TEST_DATA = [ // eslint-disable-line
],
},
{
selector: "#math-pow",
selector: "#arraysort",
expected: [
{
type: "click",
@ -125,7 +125,7 @@ const TEST_DATA = [ // eslint-disable-line
"Bubbling",
"DOM2",
],
handler: "function pow(, ) {\n" +
handler: "function sort(, ) {\n" +
" [native code]\n" +
"}",
},

Просмотреть файл

@ -7,7 +7,7 @@
#constructed-function-with-body-string,
#multiple-assignment,
#promise,
#math-pow,
#arraysort,
#handleEvent {
border: 1px solid #000;
width: 200px;
@ -44,8 +44,8 @@
promiseNode.addEventListener("click", resolve);
});
let mathPowNode = document.getElementById("math-pow");
mathPowNode.addEventListener("click", Math.pow);
let arraySortNode = document.getElementById("arraysort");
arraySortNode.addEventListener("click", Array.sort);
new HandleEvent();
@ -95,7 +95,7 @@
</div>
<div id="multiple-assignment">Multiple Assignment</div>
<div id="promise">Promise</div>
<div id="math-pow">Math.pow</div>
<div id="arraysort">Array.sort</div>
<div id="handleEvent">HandleEvent</div>
</body>
</html>

Просмотреть файл

@ -3781,7 +3781,6 @@ static const JSFunctionSpec array_methods[] = {
static const JSFunctionSpec array_static_methods[] = {
JS_INLINABLE_FN("isArray", array_isArray, 1, 0, ArrayIsArray),
#ifndef NIGHTLY_BUILD
JS_SELF_HOSTED_FN("concat", "ArrayStaticConcat", 2, 0),
JS_SELF_HOSTED_FN("lastIndexOf", "ArrayStaticLastIndexOf", 2, 0),
JS_SELF_HOSTED_FN("indexOf", "ArrayStaticIndexOf", 2, 0),
@ -3801,7 +3800,6 @@ static const JSFunctionSpec array_static_methods[] = {
JS_SELF_HOSTED_FN("unshift", "ArrayStaticUnshift", 2, 0),
JS_SELF_HOSTED_FN("splice", "ArrayStaticSplice", 3, 0),
JS_SELF_HOSTED_FN("slice", "ArrayStaticSlice", 3, 0),
#endif
JS_SELF_HOSTED_FN("from", "ArrayFrom", 3, 0),
JS_FN("of", array_of, 0, 0),

Просмотреть файл

@ -0,0 +1,6 @@
// |jit-test| error:TypeError
// Binary: cache/js-dbg-64-4e9567eeb09e-linux
// Flags: --ion-eager
//
"".replace(RegExp(), Array.reduce)

Просмотреть файл

@ -1,4 +1,4 @@
// |jit-test| skip-if: !(getBuildConfiguration().release_or_beta)
/* Array natives applied to non-arrays. */
var oa = {};

Просмотреть файл

@ -1,4 +1,4 @@
var x = Array.prototype.concat.call(Object.freeze([{}]));
var x = Array.concat(Object.freeze([{}]));
assertEq(x.length, 1);
assertEq(0 in x, true);
assertEq(JSON.stringify(x[0]), "{}");

Просмотреть файл

@ -0,0 +1,20 @@
var global = 0;
function foo(i) {
global = i;
if (global == 8) {
eval("global = 'three'");
throw global;
}
}
var caught = false;
try {
for (var i = 0; i < 10; i++) {
Array.map([i], foo);
}
} catch (e) { caught = true; }
assertEq(caught, true);
assertEq(global, 'three');

Просмотреть файл

@ -1,6 +1,16 @@
// Test exotic ways of triggering recompilation.
// Lowered native call.
var x = 0;
var y = true;
for (var i = 0; i < 20; i++) {
x += Array.map.apply(undefined, [[0], function(x) { if (i == 10) eval("y = 20"); return 1; }])[0];
}
assertEq(x, 20);
assertEq(y, 20);
// Recompilation triggered by local function.
var o = {};

Просмотреть файл

@ -1,4 +1,3 @@
// |jit-test| skip-if: !(getBuildConfiguration().release_or_beta)
actual = Array.indexOf([]);
actual += [].indexOf();
actual += Array.indexOf([]);

Просмотреть файл

@ -1,4 +1,3 @@
// |reftest| skip-if(!Array.hasOwnProperty("slice"))
var BUGNUMBER = 1263558;
var summary = "Self-host all Array generics.";

Просмотреть файл

@ -1,4 +1,3 @@
// |reftest| skip-if(!Array.hasOwnProperty("concat"))
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this

Просмотреть файл

@ -1,4 +1,3 @@
// |reftest| skip-if(!Array.hasOwnProperty("push"))
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this

Просмотреть файл

@ -1,4 +1,3 @@
// |reftest| skip-if(!Array.hasOwnProperty("slice"))
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this

Просмотреть файл

@ -35,7 +35,7 @@ function test()
try
{
var b = { length: 1 };
b.__defineGetter__(0, function () { return Array.prototype.slice.call(b); });
b.__defineGetter__(0, function () { return Array.slice(b);});
b[0];
}
catch(ex)

Просмотреть файл

@ -37,6 +37,9 @@ Object.defineProperty(src, 4, {
assertThrowsInstanceOf(() => a.set(src), TypeError);
// Not really needed
Array.reverse(a_2);
/******************************************************************************/
if (typeof reportCompare === "function")

Просмотреть файл

@ -211,12 +211,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=933681
"findIndex", "copyWithin", "fill", Symbol.iterator, Symbol.unscopables, "entries", "keys",
"values", "constructor", "flat", "flatMap"];
gConstructorProperties['Array'] =
constructorProps(["isArray", "from", "of", Symbol.species]);
if (isReleaseOrBeta) {
gConstructorProperties['Array'].push("join", "reverse", "sort", "push", "pop", "shift",
"unshift", "splice", "concat", "slice", "lastIndexOf", "indexOf", "forEach", "map", "filter",
"every", "some", "reduce", "reduceRight");
}
constructorProps(["join", "reverse", "sort", "push", "pop", "shift",
"unshift", "splice", "concat", "slice", "isArray",
"lastIndexOf", "indexOf", "forEach", "map", "filter",
"every", "some", "reduce", "reduceRight", "from", "of",
Symbol.species]);
for (var c of typedArrayClasses) {
gPrototypeProperties[c] = ["constructor", "BYTES_PER_ELEMENT"];
gConstructorProperties[c] = constructorProps(["BYTES_PER_ELEMENT"]);