]>
Commit | Line | Data |
---|---|---|
1 | function foo(f) { | |
2 | if (DFGTrue()) | |
3 | f = bar; | |
4 | return f().f; | |
5 | } | |
6 | ||
7 | noInline(foo); | |
8 | ||
9 | var object; | |
10 | function bar() { | |
11 | return object; | |
12 | } | |
13 | ||
14 | function baz() { return {f:42}; }; | |
15 | ||
16 | object = {f:42}; | |
17 | for (var i = 0; i < 1000; ++i) | |
18 | foo((i & 1) ? bar : baz); | |
19 | ||
20 | object = {e:1, f:2}; | |
21 | var result = foo(bar); | |
22 | if (result != 2) | |
23 | throw "Error: bad result: " + result; | |
24 |