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