]>
Commit | Line | Data |
---|---|---|
ed1e77d3 A |
1 | var n = 10000000; |
2 | ||
3 | function bar(set) { | |
4 | var result = set(0); | |
5 | if (result !== void 0) | |
6 | throw "Error: bad value: " + result; | |
7 | } | |
8 | ||
9 | function foo(b) { | |
10 | var result = 0; | |
11 | var imUndefined; | |
12 | var baz; | |
13 | var set = function (x) { | |
14 | result = x; | |
15 | if (baz !== 50) | |
16 | throw "Error: bad value: " + baz; | |
17 | return imUndefined; | |
18 | } | |
19 | baz = 50; | |
20 | if (b) { | |
21 | OSRExit(); | |
22 | if (b) { | |
23 | bar(set); | |
24 | } | |
25 | return 0; | |
26 | } | |
27 | return result; | |
28 | } | |
29 | ||
30 | noInline(bar); | |
31 | noInline(foo); | |
32 | ||
33 | for (var i = 0; i < n; i++) { | |
34 | var result = foo(!(i % 100)); | |
35 | if (result != 0) | |
36 | throw "Error: bad result: " + result; | |
37 | } |