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