blob: 04a6d4b98823738ff718a499e91c68ee6cd8136a [file] [log] [blame]
function foo(a, b) {
return a + b;
}
function verify(a, b) {
if (a !== b)
throw "Error: the two arguments objects aren't identical.";
}
noInline(verify);
function bar() {
var a = arguments;
this.verify(arguments, a);
return foo.apply(null, a);
}
function baz(a, b) {
return this.bar(a, b);
}
noInline(baz);
for (var i = 0; i < 20000; ++i) {
var o = {
baz: baz,
bar: bar,
verify: function() { }
};
var result = o.baz(1, 2);
if (result != 1 + 2)
throw "Error: bad result: " + result;
}
var o = {
baz: baz,
bar: bar,
verify: verify
};
var result = o.baz(1, 2);
if (result != 1 + 2)
throw "Error: bad result at end: " + result;