blob: c2b68595518192e8a12d6e0f325b5edc6fc90d8c [file] [log] [blame]
function foo()
{
return arguments.length;
}
function bar(...args)
{
var a = [42];
if (isFinalTier())
a = args;
return {ftl: isFinalTier(), result: foo(...a)};
}
function baz()
{
return bar(1, 2, 3, 4);
}
noInline(baz);
for (var i = 0; i < 100000; ++i) {
var result = baz();
if (result.ftl) {
if (result.result != 4)
throw "Error: bad result in loop in DFG: " + result.result;
} else {
if (result.result != 1)
throw "Error: bad result in loop before DFG: " + result.result;
}
}