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