]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/function-expression-exit.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / function-expression-exit.js
1 function foo(x) {
2 var tmp = x + 1;
3 return function() { return 42; }
4 }
5
6 noInline(foo);
7
8 for (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
14 var result = foo(42.5)();
15 if (result != 42)
16 throw "Error: bad result at end: " + result;