]> git.saurik.com Git - apple/javascriptcore.git/blame - 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
CommitLineData
81345200
A
1function foo(a, b) {
2 return bar(a, b);
3}
4
5function bar(a, b) {
6 var x = baz.apply(null, arguments);
7 var y = baz(a, b)
8 return x + y * 3;
9}
10
11function baz(a, b) {
12 return a + b * 2;
13}
14
15noInline(foo);
16
17for (var i = 0; i < 100000; ++i) {
18 var result = foo(7, 11);
19 if (result != 116)
20 throw "Error: bad result: " + result;
21}
22
23var result = foo(5, 2147483646);
24if (result != 17179869188)
25 throw "Error: bad result: " + result;