]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/arguments-exit-strict-mode-fixed.js
fa816f2eb3b2e5cfe9d16886f0b2d41ba422a194
[apple/javascriptcore.git] / tests / stress / arguments-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 noInline(foo);
9
10 for (var i = 0; i < 10000; ++i) {
11 var result = foo({f:i});
12 if (result != i + i + 1)
13 throw "Error: bad result: " + result;
14 }
15
16 var result = foo({f:4.5});
17 if (result != 4.5 + 4.5 + 1)
18 throw "Error: bad result at end: " + result;