]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/phantom-local-captured-but-not-flushed-to-ssa.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / phantom-local-captured-but-not-flushed-to-ssa.js
1 function foo(x, y) {
2 if (y) {
3 if (x < 10)
4 x = 15;
5 }
6 if (false)
7 arguments[0] = 42;
8 return x;
9 }
10
11 function bar(x) {
12 return foo(10, x);
13 }
14
15 noInline(bar);
16
17 for (var i = 0; i < 100000; ++i) {
18 var result = bar(true);
19 if (result != 10)
20 throw "Error: bad result: " + result;
21 }