blob: 931684f934c2be7d9630309e7480448bae2f5786 [file] [log] [blame]
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
function foo(o, p) {
var result = 0;
for (var i = 0; i < 100; ++i) {
result += o.f;
p.g = 42;
}
return result;
}
noInline(foo);
function test(o) {
if (foo(o, {}) != 100)
throw new Error("Error: bad result: " + result);
}
for (var i = 0; i < 100; ++i) {
test({f:1, g:2});
test({f:1, h:2});
test({f:1, i:2});
test({f:1, j:2});
test({f:1, k:2});
test({f:1, l:2});
}
for (var i = 0; i < 10000; ++i)
test({f:1, g:2});