]>
Commit | Line | Data |
---|---|---|
ed1e77d3 A |
1 | function foo(a, b) { |
2 | return a + b; | |
3 | } | |
4 | noInline(foo); | |
5 | ||
6 | function bar() { | |
7 | return foo.apply(this, arguments); | |
8 | } | |
9 | ||
10 | function fuzz(a, b, c, d, e, f) { | |
11 | return a + b + c + d + e + f; | |
12 | } | |
13 | noInline(fuzz); | |
14 | ||
15 | function baz(array) { | |
16 | var a = array[0]; | |
17 | var b = array[1]; | |
18 | var c = array[2]; | |
19 | var d = array[3]; | |
20 | var e = array[4]; | |
21 | var f = array[5]; | |
22 | var g = array[6]; | |
23 | var h = array[7]; | |
24 | var i = array[8]; | |
25 | var j = array[9]; | |
26 | ||
27 | var x = bar(a, b); | |
28 | var y = fuzz(a, b, c, d, e, f); | |
29 | ||
30 | return a + b + c + d + e + f + g + h + i + j + x + y; | |
31 | } | |
32 | ||
33 | noInline(baz); | |
34 | ||
35 | for (var i = 0; i < 10000; ++i) { | |
36 | var result = baz([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); | |
37 | if (result != 61) | |
38 | throw "Error: bad result: " + result; | |
39 | } | |
40 |