blob: 4f91f7a13ca676e0a80952f98fc085a54a23d910 [file] [log] [blame]
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
function foo(p) {
if (!p)
return function() { return p; };
try {
return arguments[1];
} catch (e) {
return 42;
}
}
var n = 100000;
var result = 0;
for (var i = 0; i < n; ++i)
result += foo(true, 24);
if (result != n * 24)
throw "Error: bad result: " + result;
result = foo(true);
if (result !== void 0)
throw "Error: bad result at end: " + result;