blob: 4c75991cf1422b481c314f45e234d78c79aae05c [file] [log] [blame]
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
(function() {
function foo(x) { return 1; }
function bar(x) { return x; }
var f = foo;
var g = bar;
var result = 0;
var n = 100000;
for (var i = 0; i < n; ++i) {
result += f(42);
var tmp = f;
f = g;
g = tmp;
}
if (result != n / 2 * 42 + n / 2 * 1)
throw "Error: bad result: " + result;
})();