]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/forward-varargs-for-inlined-escaped-arguments.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / forward-varargs-for-inlined-escaped-arguments.js
CommitLineData
ed1e77d3
A
1function foo() {
2 return arguments;
3}
4
5function baz(a, b, c) {
6 return a + b + c;
7}
8
9function bar(a, b, c) {
10 var args = foo(b, c, 42);
11 return baz.apply(void 0, args);
12}
13
14noInline(bar);
15
16for (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