]>
Commit | Line | Data |
---|---|---|
ed1e77d3 A |
1 | function foo(a) { |
2 | var x; | |
3 | if (a) | |
4 | x = a; | |
5 | return [function() { | |
6 | return x; | |
7 | }, function(a) { | |
8 | x = a; | |
9 | }]; | |
10 | } | |
11 | ||
12 | var array = foo(false); | |
13 | noInline(array[0]); | |
14 | noInline(array[1]); | |
15 | array[1](42); | |
16 | for (var i = 0; i < 10000; ++i) { | |
17 | var result = array[0](); | |
18 | if (result != 42) | |
19 | throw "Error: bad result in loop: " + result; | |
20 | } | |
21 | ||
22 | array[1](43); | |
23 | var result = array[0](); | |
24 | if (result != 43) | |
25 | throw "Error: bad result at end: " + result; |