blob: 9ad5a2d5997501157ac16632a2f1b6c51a853762 [file] [log] [blame]
function foo(o) {
return o.f + 1;
}
function bar(o, i, v) {
o[i] = v;
}
function baz() {
return {};
}
noInline(foo);
noInline(bar);
noInline(baz);
var o0 = baz();
bar(o0, "f", "hello");
for (var i = 0; i < 10000; ++i) {
var o = baz();
o.f = 42;
var result = foo(o);
if (result != 43)
throw "Error: bad result in loop: " + result;
}
var result = foo(o0);
if (result != "hello1")
throw "Error: bad result at end: " + result;