]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/inline-call-varargs-and-call.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / inline-call-varargs-and-call.js
1 function foo(a, b) {
2 return bar(a, b);
3 }
4
5 function bar(a, b) {
6 var x = baz.apply(null, arguments);
7 var y = baz(a, b)
8 return x + y * 3;
9 }
10
11 function baz(a, b) {
12 return a + b * 2;
13 }
14
15 noInline(foo);
16
17 for (var i = 0; i < 100000; ++i) {
18 var result = foo(7, 11);
19 if (result != 116)
20 throw "Error: bad result: " + result;
21 }
22
23 var result = foo(5, 2147483646);
24 if (result != 17179869188)
25 throw "Error: bad result: " + result;