blob: 9aaaac4105168478fc313671b8d76b10e3df068a [file] [log] [blame]
description(
"Tests that the DFG CFA is not overzealous in removing prototype structure checks for put_by_id transitions."
);
function foo(a, b)
{
a.f = b;
}
var Empty = "";
function Foo() {
}
var stuff;
for (var i = 0; i < 1000; ++i) {
if (i >= 900)
Foo.prototype.__defineSetter__("f", function(value) { stuff = value; });
var o = new Foo();
eval(Empty + "foo(o, i)");
if (i >= 900) {
shouldBe("stuff", "" + i);
shouldBe("o.f", "" + (void 0));
} else
shouldBe("o.f", "" + i);
}