blob: 391870856dcccc3aa7edc4c6d70ec6f17eeb3986 [file] [log] [blame]
function foo(o) {
return o.f;
}
function Foo() { }
Foo.prototype.f = 1;
function Bar() { }
Bar.prototype.f = 2;
function bar() {
var o = new Foo();
var p = new Bar();
var result = 0;
for (var i = 0; i < 2000000; ++i)
result += foo(o) + foo(p);
return result;
}
var result = bar();
if (result != 6000000)
throw "Bad result: " + result;