blob: 7f87304a0b80ada6410ee05b77bffa8197f7db40 [file] [log] [blame]
function foo(a) {
var x = a + 1;
var f = function(a) {
return x + a;
};
noInline(f);
for (var i = 0; i < 10000; ++i) {
var result = f(i);
if (result != a + 1 + i)
throw "Error: bad result: " + result;
}
x = 999;
var result = f(1);
if (result != 999 + 1)
throw "Error: bad result: " + result;
}
noInline(foo);
for (var i = 0; i < 3; ++i)
foo(42 + i);