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