]>
Commit | Line | Data |
---|---|---|
ed1e77d3 A |
1 | function foo() { |
2 | return function() { return effectful42.apply(this, arguments) }; | |
3 | } | |
4 | noInline(foo); | |
5 | ||
6 | function bar(a) { | |
7 | var result = foo()(); | |
8 | return [result, result, result, result, result, result, result, result, result + a]; | |
9 | } | |
10 | ||
11 | noInline(bar); | |
12 | ||
13 | for (var i = 0; i < 10000; ++i) { | |
14 | var result = "" + bar(1); | |
15 | if (result != "42,42,42,42,42,42,42,42,43") | |
16 | throw "Error: bad result: " + result; | |
17 | } | |
18 | ||
19 | var result = "" + bar(2147483647); | |
20 | if (result != "42,42,42,42,42,42,42,42,2147483689") | |
21 | throw "Error: bad result at end: " + result; |