blob: a0acfe54dc45dc0b3af29bd03a4668f3f24e0701 [file] [log] [blame]
description("Verify that we don't use our caller's arguments object in an inlined function.");
function bar(x) {
var t = arguments;
var a = x;
return a;
}
function foo(x) {
var t = arguments;
var a = x;
return bar(1);
}
noInline(foo);
function test() {
for (var i = 0; i < 10000; ++i) {
var result = foo(42);
if (result != 1) {
testFailed("Expected 1, but got " + result);
return false;
}
}
return true;
}
if (test())
testPassed("Correctly accessed inlined callee's own arguments");