blob: aae20a704059002647df1a9d0f4f453f25215b98 [file] [log] [blame]
function fooMaker(xParam) {
var x = xParam;
return function (y) {
for (var i = 0; i < 1000; ++i)
y += x;
return y;
}
}
var foo = fooMaker(42);
noInline(foo);
for (var i = 0; i < 10000; ++i) {
var result = foo(5);
if (result != 42 * 1000 + 5)
throw "Error: bad result: " + result;
}
var result = fooMaker(23)(5);
if (result != 23 * 1000 + 5)
throw "Error: bad result: " + result;