blob: b142c7e211dee3140726dfc7d9e10fa41f802f9d [file] [log] [blame]
function foo(x) {
return new Array(x);
}
noInline(foo);
function test(size) {
var result = foo(size);
if (result.length != size)
throw "Error: bad result: " + result;
var sawThings = false;
for (var s in result)
sawThings = true;
if (sawThings)
throw "Error: array is in bad state: " + result;
}
for (var i = 0; i < 100000; ++i) {
test(0);
test(1);
test(42);
}