blob: 8286d68fc850b8c0a958d683b12d707ba744c45e [file] [log] [blame]
var p = {f:true};
function foo(a, b, d) {
var c;
if (p.f)
c = b;
return d[a / c];
}
var result = 0;
var array = [42, 43, 44, 45, 46];
for (var i = 0; i < 300000; ++i)
result += foo((i % 3) * 2, (i % 2) + 1, array);
if (result != 13050000)
throw "Bad result: " + result;