]>
Commit | Line | Data |
---|---|---|
1 | function bar(f) { | |
2 | throw f; | |
3 | } | |
4 | ||
5 | noInline(bar); | |
6 | ||
7 | var shouldContinue = true; | |
8 | ||
9 | function foo(a) { | |
10 | var x = a + 1; | |
11 | while (shouldContinue) { | |
12 | bar(function() { return x; }); | |
13 | } | |
14 | } | |
15 | ||
16 | noInline(foo); | |
17 | ||
18 | for (var i = 0; i < 10000; ++i) { | |
19 | try { | |
20 | foo(i); | |
21 | } catch (f) { | |
22 | var result = f(); | |
23 | if (result != i + 1) | |
24 | throw "Error: bad result for i = " + i + ": " + result; | |
25 | } | |
26 | } | |
27 |