blob: 258c4415e577c5b8157d005a66597f379a64e692 [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
noInline(shouldBe);
function test(object)
{
return object.return;
}
noInline(test);
var object1 = {};
var object2 = { hello: 42 };
for (var i = 0; i < 10; ++i) {
shouldBe(test(object1), undefined);
}
for (var i = 0; i < 1e6; ++i) {
shouldBe(test(object1), undefined);
shouldBe(test(object2), undefined);
}