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