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