blob: 5fa8bd61367006ed44661133ae1de56a1233ab28 [file] [log] [blame]
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
function foo(p, o) {
var result = 0;
for (var i = 0; i < 1000; ++i) {
if (p)
result += o.f;
else
result++;
}
return result;
}
noInline(foo);
var o = {f:42};
var p = {};
var result = 0;
for (var i = 0; i < 1000; ++i) {
result += foo(true, o);
result += foo(false, p);
}
for (var i = 0; i < 10000; ++i)
result += foo(false, p);
for (var i = 0; i < 30000; ++i)
result += foo(true, o);
if (result != 1313000000)
throw "Error: bad result: " + result;