]>
Commit | Line | Data |
---|---|---|
1 | function foo(index) { | |
2 | if (index > 1000) | |
3 | arguments = [1, 2, 3]; | |
4 | return arguments[index]; | |
5 | } | |
6 | ||
7 | noInline(foo); | |
8 | ||
9 | for (var i = 0; i < 100000; ++i) { | |
10 | var result = foo(1, 42); | |
11 | if (result != 42) | |
12 | throw "Error: bad result in loop: " + result; | |
13 | } | |
14 | ||
15 | var result = foo(-1); | |
16 | if (result !== void 0) | |
17 | throw "Error: bad result at end: " + result; |