]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/phantom-arguments-set-local-then-exit-in-same-block.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / phantom-arguments-set-local-then-exit-in-same-block.js
1 function foo(o) {
2 var a = arguments;
3 var result = o.f;
4 for (var i = 1; i < a.length; ++i)
5 result += a[i];
6 return result;
7 }
8
9 noInline(foo);
10
11 for (var i = 0; i < 100; ++i)
12 foo({f:42}, 1, 2, 3);
13
14 var result = foo({g:40, f:41}, 1, 2.5, 3);
15 if (result != 47.5)
16 throw "Bad result: " + result;
17