]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/arguments-exit.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / arguments-exit.js
CommitLineData
ed1e77d3
A
1function foo(x) {
2 var tmp = x + 1;
3 return tmp + arguments[0];
4}
5
6noInline(foo);
7
8for (var i = 0; i < 10000; ++i) {
9 var result = foo(i);
10 if (result != i + i + 1)
11 throw "Error: bad result: " + result;
12}
13
14var result = foo(4.5);
15if (result != 4.5 + 4.5 + 1)
16 throw "Error: bad result at end: " + result;