]>
Commit | Line | Data |
---|---|---|
1 | var n = 10000000; | |
2 | ||
3 | function bar(f) { f(10); } | |
4 | ||
5 | function foo(b) { | |
6 | var result = 0; | |
7 | var set = function (x) { result = x; } | |
8 | if (b) { | |
9 | bar(set); | |
10 | if (result != 10) | |
11 | throw "Error: bad: " + result; | |
12 | return 0; | |
13 | } | |
14 | return result; | |
15 | } | |
16 | ||
17 | noInline(bar); | |
18 | noInline(foo); | |
19 | ||
20 | for (var i = 0; i < n; i++) { | |
21 | var result = foo(!(i % 100)); | |
22 | if (result != 0) | |
23 | throw "Error: bad result: " + result; | |
24 | } |