]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/scoped-arguments-array-length.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / scoped-arguments-array-length.js
1 function foo(a) {
2 var result = 0;
3 if (!a)
4 return function() { return a };
5 for (var i = 0; i < arguments.length; ++i)
6 result += arguments[i];
7 return result;
8 }
9
10 noInline(foo);
11
12 for (var i = 0; i < 10000; ++i) {
13 var result = foo(42, i);
14 if (result != 42 + i)
15 throw "Error: bad result: " + result;
16 }
17