blob: 53d752decd7d0f31bc2f1d78991c69101f08bff3 [file] [log] [blame]
"use strict";
function foo(x, y)
{
if (arguments.length >= 2)
return foo(x+y)
return x;
}
noInline(foo);
function bar(x)
{
if (arguments.length >= 2)
return bar(arguments[0] + arguments[1])
return x;
}
noInline(bar);
for (var i = 0; i < 10000; ++i) {
var result = foo(40, 2);
if (result !== 42)
throw Error("Wrong result for foo, expected 42, got " + result);
result = bar(40, 2);
if (result !== 42)
throw Error("Wrong result for bar, expected 42, got " + result);
}