]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/get-my-argument-by-val-safe-wrap-around.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / get-my-argument-by-val-safe-wrap-around.js
CommitLineData
ed1e77d3
A
1function foo(index) {
2 if (index > 1000)
3 arguments = [1, 2, 3];
4 return arguments[index];
5}
6
7noInline(foo);
8
9for (var i = 0; i < 100000; ++i) {
10 var result = foo(1, 42);
11 if (result != 42)
12 throw "Error: bad result in loop: " + result;
13}
14
15var result = foo(-1);
16if (result !== void 0)
17 throw "Error: bad result at end: " + result;