summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testSlowArrayLength.js
blob: f19ec4bfad0f7b48ad8f71c94f631098df9192bd (plain)
1
2
3
4
5
6
7
8
9
10
function testSlowArrayLength()
{
  var counter = 0;
  var a = [];
  a[10000 - 1] = 0;
  for (var i = 0; i < a.length; i++)
    counter++;
  return counter;
}
assertEq(testSlowArrayLength(), 10000);