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