michael@0: // This test case failed a WIP patch. See https://bugzilla.mozilla.org/show_bug.cgi?id=504587#c68 michael@0: michael@0: function B() {} michael@0: B.prototype.x = 1; michael@0: var d = new B; michael@0: michael@0: var names = ['z', 'z', 'z', 'z', 'z', 'z', 'z', 'x']; michael@0: for (var i = 0; i < names.length; i++) { michael@0: x = d.x; // guard on shapeOf(d) michael@0: d[names[i]] = 2; // unpredicted shape change michael@0: y = d.x; // guard here is elided michael@0: } michael@0: assertEq(y, 2); // Assertion failed: got 1, expected 2