]>
Commit | Line | Data |
---|---|---|
81345200 A |
1 | function foo(x) { |
2 | return function(y) { return x + y; } | |
3 | } | |
4 | ||
5 | function bar(a, b) { | |
6 | return foo(a)(b); | |
7 | } | |
8 | ||
9 | noInline(foo); | |
10 | noInline(bar); | |
11 | ||
12 | for (var i = 0; i < 100000; ++i) { | |
13 | var result = bar(i, i + 1); | |
14 | if (result != i * 2 + 1) | |
15 | throw "Error: bad result for " + i + ": " + result; | |
16 | } |