]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/sink_checkstructure.js
2427a63eb562864999048ed12ef1d33b7fafed18
[apple/javascriptcore.git] / tests / stress / sink_checkstructure.js
1 function foo(p, q) {
2 var o = {};
3 if (p) o.f = 42;
4 if (q) { o.f++; return o; }
5 }
6 noInline(foo);
7
8 var expected = foo(false, true).f;
9
10 for (var i = 0; i < 1000000; i++) {
11 foo(true, true);
12 }
13
14 var result = foo(false, true).f;
15
16 if (!Object.is(result, expected))
17 throw "Error: expected " + expected + "; FTL produced " + result;