]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/activation-sink-osrexit.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / activation-sink-osrexit.js
CommitLineData
ed1e77d3
A
1var n = 10000000;
2
3function bar() { }
4
5function foo(b) {
6 var result = 0;
7 var set = function (x) { result = x; }
8 if (b) {
9 OSRExit();
10 if (b) {
11 bar(set);
12 }
13 return 0;
14 }
15 return result;
16}
17
18noInline(bar);
19noInline(foo);
20
21for (var i = 0; i < n; i++) {
22 var result = foo(!(i % 100));
23 if (result != 0)
24 throw "Error: bad result: " + result;
25}