blob: 000a36df8b0f5e7567b65cefbbc702f778f6d6ca [file] [log] [blame]
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
function foo(a) {
var result = a[0];
if (result)
result += a[1];
if (result)
result += a[2];
if (result)
result += a[3];
if (result)
result += a[4];
return result;
}
var result = 0;
for (var i = 0; i < 100000; ++i) {
var array = [1, 2, 3, 4, 5];
if (i & 1)
array.f = 42;
result += foo(array);
}
if (result != 1500000)
throw "Error: bad result: " + result;