blob: 8bd8e901b87f9bc6cce15c06e7e4be04be4b9439 [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var array = [];
function test1(array)
{
return array.length;
}
noInline(test1);
for (var i = 0; i < 1e5; ++i)
shouldBe(test1(array), 0);
var array = [];
array.ok = 42;
function test2(array)
{
return array.length;
}
noInline(test2);
for (var i = 0; i < 1e5; ++i)
shouldBe(test2(array), 0);