blob: 6fcfe53b43dcb8e112050d2ffdc4a2ba88776a3a [file] [log] [blame]
function foo(p, o) {
var q = o.q;
if (p)
return q.f;
return q.g;
}
noInline(foo);
var o = {q: {f: 41, g: 42}};
for (var i = 0; i < 100000; ++i) {
var result = foo(false, o);
if (result != 42)
throw "Error: bad result: " + result;
}
var result = foo(true, o);
if (result != 41)
throw "Error: bad result at end: " + result;