michael@0: function testSetProtoRegeneratesObjectShape() michael@0: { michael@0: var f = function() {}; michael@0: var g = function() {}; michael@0: g.prototype.__proto__ = {}; michael@0: michael@0: function iq(obj) michael@0: { michael@0: for (var i = 0; i < 10; ++i) michael@0: "" + obj.prototype; michael@0: } michael@0: michael@0: iq(f); michael@0: iq(f); michael@0: iq(f); michael@0: iq(f); michael@0: iq(g); michael@0: michael@0: if (shapeOf(f.prototype) === shapeOf(g.prototype)) michael@0: return "object shapes same after proto of one is changed"; michael@0: michael@0: return true; michael@0: } michael@0: assertEq(testSetProtoRegeneratesObjectShape(), true);