]>
Commit | Line | Data |
---|---|---|
1 | function foo() { | |
2 | return fiatInt52(bar(DFGTrue())) + 1; | |
3 | } | |
4 | ||
5 | var thingy = false; | |
6 | function bar(p) { | |
7 | if (thingy) | |
8 | return "hello"; | |
9 | return p ? 42 : 5.5; | |
10 | } | |
11 | ||
12 | noInline(foo); | |
13 | noInline(bar); | |
14 | ||
15 | for (var i = 0; i < 1000000; ++i) { | |
16 | var result = foo(); | |
17 | if (result != 43 && result != 6.5) | |
18 | throw "Error: bad result: " + result; | |
19 | } | |
20 | ||
21 | thingy = true; | |
22 | var result = foo(); | |
23 | if (result != "hello1") | |
24 | throw "Error: bad result at end: " + result; |