]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/closure-call-exit.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / closure-call-exit.js
CommitLineData
ed1e77d3
A
1function foo(o, i) {
2 return o[i]();
3}
4
5noInline(foo);
6
7for (var i = 0; i < 10000; ++i) {
8 var result = foo([function() { return 42; }], 0);
9 if (result != 42)
10 throw "Error: bad result: " + result;
11}
12
13var result = foo([function() { return 43; }], 0);
14if (result != 43)
15 throw "Error: bad result at end: " + result;