blob: e4510b3f1ef60262810b2a5d48bbfd7fae14cdff [file] [log] [blame]
function foo(o) {
return o.f;
}
noInline(foo);
function Foo() { }
Foo.prototype.f = 42;
for (var i = 0; i < 100000; ++i) {
if (i & 1) {
var result = foo(new Foo());
if (result != 42)
throw "Error: bad result for new Foo(): " + result;
} else {
var result = foo({f:24});
if (result != 24)
throw "Error: bad result for {f:24}: " + result;
}
}