]>
Commit | Line | Data |
---|---|---|
ed1e77d3 A |
1 | function foo(p, v) { |
2 | if (p) | |
3 | global = v; | |
4 | } | |
5 | ||
6 | function bar() { | |
7 | return global; | |
8 | } | |
9 | ||
10 | noInline(foo); | |
11 | noInline(bar); | |
12 | ||
13 | for (var i = 0; i < 10; ++i) | |
14 | foo(false); | |
15 | ||
16 | var value = 42; | |
17 | foo(true, value); | |
18 | var n = 100000; | |
19 | var m = 100; | |
20 | for (var i = 0; i < n; ++i) { | |
21 | if (i == n - m) | |
22 | foo(true, value = 53); | |
23 | var result = bar(); | |
24 | if (result != value) | |
25 | throw "Error: on iteration " + i + " got: " + result; | |
26 | } |