Replace gc() calls in staging/sm/

Ref. #4376
This commit is contained in:
Ms2ger 2025-01-09 11:42:30 +01:00 committed by Philip Chimento
parent a37cb9c206
commit 5f98e1d39d
15 changed files with 24 additions and 24 deletions

View File

@ -33,7 +33,7 @@ function testStart()
valueOf: function()
{
$262.detachArrayBuffer(ab);
gc();
$262.gc();
return 0x800;
}
};
@ -61,7 +61,7 @@ function testEnd()
valueOf: function()
{
$262.detachArrayBuffer(ab);
gc();
$262.gc();
return 0x1000;
}
};

View File

@ -33,7 +33,7 @@ function testByteOffset()
valueOf: function()
{
$262.detachArrayBuffer(ab);
gc();
$262.gc();
return 0x800;
}
};
@ -61,7 +61,7 @@ function testByteLength()
valueOf: function()
{
$262.detachArrayBuffer(ab);
gc();
$262.gc();
return 0x800;
}
};

View File

@ -35,7 +35,7 @@ function testIndex()
valueOf: function()
{
$262.detachArrayBuffer(ab);
gc();
$262.gc();
return 0xFFF;
}
};
@ -65,7 +65,7 @@ function testValue()
valueOf: function()
{
$262.detachArrayBuffer(ab);
gc();
$262.gc();
return 0x42;
}
};

View File

@ -1637,7 +1637,7 @@ function test(sharedMem) {
var ab = new ArrayBuffer(4);
var dv = new DataView(ab);
dv = 1;
gc();
$262.gc();
// Bug 1438569.
dv = new DataView(new ArrayBuffer(20 * 1024 * 1024));

View File

@ -51,7 +51,7 @@ function test()
}
catch (e)
{
gc();
$262.gc();
}
}
foopy();

View File

@ -13,5 +13,5 @@ esid: pending
---*/
var x = {}, h = new WeakMap;
h.set(x, null);
gc();
$262.gc();

View File

@ -40,7 +40,7 @@ var src = [ 10, 20, 30, 40,
Object.defineProperty(src, 4, {
get: function () {
$262.detachArrayBuffer(ab);
gc();
$262.gc();
return 200;
}
});

View File

@ -94,7 +94,7 @@ function test()
check(() => typeof map.get({}) == "undefined");
check(() => map.get({}, "foo") == undefined);
gc(); gc(); gc();
$262.gc(); $262.gc(); $262.gc();
check(() => map.get(key) == 42);
check(() => map.delete(key) == true);
@ -107,7 +107,7 @@ function test()
var value = { };
check(() => map.set(new Object(), value) === map);
gc(); gc(); gc();
$262.gc(); $262.gc(); $262.gc();
check(() => map.has("non-object key") == false);
check(() => map.has() == false);

View File

@ -37,10 +37,10 @@ f2(10);
// now observe gen's call object (which should have been put)
gc();
$262.gc();
assert.sameValue(foo(), 10);
gc();
$262.gc();
assert.sameValue(foo(), 11);
gc();
$262.gc();
assert.sameValue(foo(), 12);

View File

@ -213,7 +213,7 @@ TestGenerator(
// GC.
if (typeof gc == 'function') {
TestGenerator(function* g16() { yield "baz"; gc(); yield "qux"; },
TestGenerator(function* g16() { yield "baz"; $262.gc(); yield "qux"; },
["baz", "qux", undefined],
"foo",
["baz", "qux", undefined]);

View File

@ -49,7 +49,7 @@ function test(field)
}
inner();
gc(); // In unfixed code, this crashes trying to mark a null [[field]].
$262.gc(); // In unfixed code, this crashes trying to mark a null [[field]].
}
test("get");

View File

@ -14,7 +14,7 @@ function TestGC2(m) {
for (key = head, i = 0; i < 99999; i++, key = m.get(key)) {
m.set(key, new Object);
}
gc();
$262.gc();
for (key = head; key != undefined; key = m.get(key)) {}
}
TestGC2(new WeakMap);

View File

@ -23,7 +23,7 @@ for (var i = 3; i < 20; i++)
delete obj.g; // must update lastProp->freeslot, to avoid assertion
// extra junk to try to hit the assertion, if freeslot is not updated
gc();
$262.gc();
obj.d = 3;
obj.e = 4;

View File

@ -14,8 +14,8 @@ esid: pending
for (var u = 0; u < 3; ++u) {
var y = [];
Object.create(y);
gc();
$262.gc();
y.t = 3;
gc();
$262.gc();
}

View File

@ -34,7 +34,7 @@ function testOneDeletion()
for (var i in o)
{
gc();
$262.gc();
delete o.s;
}
}
@ -51,7 +51,7 @@ function testTwoDeletions()
for (var i in o)
{
gc();
$262.gc();
delete o.t;
delete o.s;
}
@ -70,7 +70,7 @@ function testThreeDeletions()
for (var i in o)
{
gc();
$262.gc();
delete o.x;
delete o.t;
delete o.s;