]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/captured-arguments-variable.js
JavaScriptCore-7600.1.4.9.tar.gz
[apple/javascriptcore.git] / tests / stress / captured-arguments-variable.js
1 function foo(a) {
2 return arguments[1] + (function() { return a * 101; })();
3 }
4
5 noInline(foo);
6
7 for (var i = 0; i < 10000; ++i) {
8 var result = foo(42, 97);
9 if (result != 4339)
10 throw "Error: bad result: " + result;
11 }
12
13 Object.prototype[1] = 111;
14
15 var result = foo(42);
16 if (result != 4353)
17 throw "Error: bad result at end: " + result;