blob: b7b2d4c3591d069f7ced11fb972a7b7ed370d939 [file] [log] [blame]
function foo(a, b) {
return a + b;
}
function baz() {
function bar() {
var a = arguments;
var tmp = arguments[0] + 1;
return tmp + foo.apply(null, a);
}
return bar.apply(null, arguments);
}
noInline(baz);
for (var i = 0; i < 10000; ++i) {
var result = baz(1, 2);
if (result != 1 + 1 + 3)
throw "Error: bad result: " + result;
}
var result = baz(1.5, 2);
if (result != 1.5 + 1 + 3.5)
throw "Error: bad result at end: " + result;