blob: 3737db6d779ca40fed78b2cdd6e5e02a2d3c3111 [file] [log] [blame]
function foo(index) {
if (index > 1000)
arguments = [1, 2, 3];
return arguments[index];
}
noInline(foo);
for (var i = 0; i < 100000; ++i) {
var result = foo(1, 42);
if (result != 42)
throw "Error: bad result in loop: " + result;
}
var result = foo(1);
if (result !== void 0)
throw "Error: bad result at end: " + result;