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