]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/fold-profiled-call-to-call.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / fold-profiled-call-to-call.js
CommitLineData
ed1e77d3
A
1function foo(f) {
2 if (DFGTrue())
3 f = bar;
4 return f().f;
5}
6
7noInline(foo);
8
9var object;
10function bar() {
11 return object;
12}
13
14function baz() { return {f:42}; };
15
16object = {f:42};
17for (var i = 0; i < 1000; ++i)
18 foo((i & 1) ? bar : baz);
19
20object = {e:1, f:2};
21var result = foo(bar);
22if (result != 2)
23 throw "Error: bad result: " + result;
24