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