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