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