michael@0: michael@0: /* Handle recompilation on undefined properties and array holes. */ michael@0: michael@0: var v = {}; michael@0: if (typeof v == 'string') michael@0: v.x = 0; michael@0: function prop(v) michael@0: { michael@0: var z = v.x + 1; michael@0: assertEq(z, NaN); michael@0: } michael@0: prop(v); michael@0: michael@0: v = []; michael@0: v[0] = 0; michael@0: v[1] = 1; michael@0: v[3] = 3; michael@0: v[4] = 4; michael@0: function elem(x) michael@0: { michael@0: var x = ""; michael@0: for (var i = 0; i < 5; i++) michael@0: x += v[i]; michael@0: assertEq(x, "01undefined34"); michael@0: } michael@0: elem(v);