]>
Commit | Line | Data |
---|---|---|
1 | function foo(x) { | |
2 | var tmp = x + 1; | |
3 | return tmp + arguments[0]; | |
4 | } | |
5 | ||
6 | function bar(x) { | |
7 | return foo(x); | |
8 | } | |
9 | ||
10 | noInline(bar); | |
11 | ||
12 | for (var i = 0; i < 10000; ++i) { | |
13 | var result = bar(i); | |
14 | if (result != i + i + 1) | |
15 | throw "Error: bad result: " + result; | |
16 | } | |
17 | ||
18 | var result = bar(4.5); | |
19 | if (result != 4.5 + 4.5 + 1) | |
20 | throw "Error: bad result at end: " + result; |