]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/inline-closure-call.js
JavaScriptCore-7600.1.4.16.1.tar.gz
[apple/javascriptcore.git] / tests / stress / inline-closure-call.js
CommitLineData
81345200
A
1function foo(x) {
2 return function(y) { return x + y; }
3}
4
5function bar(a, b) {
6 return foo(a)(b);
7}
8
9noInline(foo);
10noInline(bar);
11
12for (var i = 0; i < 100000; ++i) {
13 var result = bar(i, i + 1);
14 if (result != i * 2 + 1)
15 throw "Error: bad result for " + i + ": " + result;
16}