blob: dbf62ab306c33543329b92d9602f0127c9b2fe20 [file] [log] [blame]
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ runNoFTL
var array = [ "a", "b", "c", "d" ];
function foo(array, s) {
for (var i = 0; i < array.length; ++i) {
if (array[i] == s)
return true;
}
return false;
}
var result = 0;
for (var i = 0; i < 1000000; ++i)
result += foo(array, "d");
if (result != 1000000)
throw "Bad result: " + result;