blob: be51c69febffa9801745d28a82e2ddad5047c6b3 [file] [log] [blame]
fpizlo@apple.com0307dd42013-04-24 22:39:33 +00001description(
2"Checks that if a DFG AllocationProfileWatchpoint fires and the callee is otherwise dead, we still preserve the callee for the bytecode and don't crash."
3);
4
5function Foo() {
6 this.f = 42;
7}
8
9function foo() {
fpizlo@apple.com0307dd42013-04-24 22:39:33 +000010 return new Foo().f;
11}
12
fpizlo@apple.com4bc850b2013-09-05 06:30:15 +000013silentTestPass = true;
14noInline(Foo);
15
16for (var i = 0; i < 100; i = dfgIncrement({f:Foo, i:i + 1, n:90})) {
fpizlo@apple.com0307dd42013-04-24 22:39:33 +000017 if (i == 95)
18 Foo.prototype = {foo: 62};
19 shouldBe("foo()", "42");
20}