]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/call-forward-varargs-for-inlined-escaped-arguments.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / call-forward-varargs-for-inlined-escaped-arguments.js
1 function foo() {
2 return arguments;
3 }
4
5 function baz(a, b, c) {
6 return a + b + c;
7 }
8
9 noInline(baz);
10
11 function bar(a, b, c) {
12 var args = foo(b, c, 42);
13 return baz.apply(void 0, args);
14 }
15
16 noInline(bar);
17
18 for (var i = 0; i < 10000; ++i) {
19 var result = bar(1, 2, 3);
20 if (result != 47)
21 throw "Error: bad result: " + result;
22 }
23