michael@0: michael@0: // Don't use NativeIterator cache for objects with dense elements. michael@0: michael@0: function bar(a) { michael@0: var n = 0; michael@0: for (var b in a) { n++; } michael@0: return n; michael@0: } michael@0: michael@0: function foo() { michael@0: var x = {a:0,b:1}; michael@0: var y = {a:0,b:1}; michael@0: y[0] = 2; michael@0: y[1] = 3; michael@0: for (var i = 0; i < 10; i++) { michael@0: assertEq(bar(x), 2); michael@0: assertEq(bar(y), 4); michael@0: } michael@0: } michael@0: foo();