]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/ftl-get-my-argument-by-val.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / ftl-get-my-argument-by-val.js
1 function foo(i) {
2 return arguments[i];
3 }
4
5 noInline(foo);
6
7 for (var i = 0; i < 10000; ++i) {
8 var thingies = [i % 4, "one", 2, "three"];
9 var result = foo(i % 4, "one", 2, "three");
10 if (result != thingies[i % 4])
11 throw "Error: bad result for i = " + i + ": " + result;
12 }