]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/phantom-direct-arguments-clobber-callee.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / phantom-direct-arguments-clobber-callee.js
CommitLineData
ed1e77d3
A
1function foo() {
2 return function() { return effectful42.apply(this, arguments) };
3}
4noInline(foo);
5
6function bar(a) {
7 var result = foo()();
8 return [result, result, result, result, result, result, result, result, result + a];
9}
10
11noInline(bar);
12
13for (var i = 0; i < 10000; ++i) {
14 var result = "" + bar(1);
15 if (result != "42,42,42,42,42,42,42,42,43")
16 throw "Error: bad result: " + result;
17}
18
19var result = "" + bar(2147483647);
20if (result != "42,42,42,42,42,42,42,42,2147483689")
21 throw "Error: bad result at end: " + result;