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