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