fpizlo@apple.com | 0307dd4 | 2013-04-24 22:39:33 +0000 | [diff] [blame] | 1 | description( |
| 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 | |
| 5 | function Foo() { |
| 6 | this.f = 42; |
| 7 | } |
| 8 | |
| 9 | function foo() { |
fpizlo@apple.com | 0307dd4 | 2013-04-24 22:39:33 +0000 | [diff] [blame] | 10 | return new Foo().f; |
| 11 | } |
| 12 | |
fpizlo@apple.com | 4bc850b | 2013-09-05 06:30:15 +0000 | [diff] [blame] | 13 | silentTestPass = true; |
| 14 | noInline(Foo); |
| 15 | |
| 16 | for (var i = 0; i < 100; i = dfgIncrement({f:Foo, i:i + 1, n:90})) { |
fpizlo@apple.com | 0307dd4 | 2013-04-24 22:39:33 +0000 | [diff] [blame] | 17 | if (i == 95) |
| 18 | Foo.prototype = {foo: 62}; |
| 19 | shouldBe("foo()", "42"); |
| 20 | } |