blob: 2498310d70a488adcb9284bdb68ab57bfbca5d1b [file] [log] [blame]
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
var f = Symbol(), g = Symbol(), h = Symbol();
function foo(o) {
for (var i = 0; i < 100; ++i)
o[f] = (o[f] | 0) + 42;
}
noInline(foo);
for (var i = 0; i < 100000; ++i) {
var object;
if ((i % 3) == 0)
object = {[g]:3};
else if ((i % 3) == 1)
object = {[f]:1, [g]:2};
else if ((i % 3) == 2)
object = {[g]:1, [f]:2};
foo(object);
if (object[f] != 42 * 100 + (i % 3))
throw "Error: bad result for i = " + i + ": " + object[f];
}
var r = {[g]:3, [h]:4, [f]:5};
foo(r);
if (r[f] != 5 + 42 * 100)
throw "Error: bad result at end: " + r[f];