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