michael@0: michael@0: /* Don't confuse JIT code by making slow arrays that use inline slots inconsistently. */ michael@0: michael@0: function foo(a) michael@0: { michael@0: assertEq(a.x, 5); michael@0: } michael@0: michael@0: function bar() michael@0: { michael@0: for (var i = 0; i < 50; i++) { michael@0: var a = []; michael@0: a[i] = 0; michael@0: delete a[i]; michael@0: a.x = 5; michael@0: foo(a); michael@0: } michael@0: michael@0: var b = [1,,2,,3,,4,,5]; michael@0: assertEq(b.toString(), "1,,2,,3,,4,,5"); michael@0: b.x = 0; michael@0: assertEq(b.toString(), "1,,2,,3,,4,,5"); michael@0: delete b.x; michael@0: delete b[8]; michael@0: delete b[6]; michael@0: delete b[4]; michael@0: assertEq(b.toString(), "1,,2,,,,,,"); michael@0: } michael@0: bar();