]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/elide-new-object-dag-then-exit.js
fbe99a5f7db0b54a61fddd450eec13ccfbfcfe43
1 function sumOfArithSeries(limit
) {
2 return limit
* (limit
+ 1) / 2;
9 function verify(q
, i
) {
11 throw "Error: q.f == q.g";
13 throw "Error: q.f.f != q.g.f";
15 throw "Error: q.f.f.f != i";
20 for (var i
= 0; i
< n
; ++i
) {
27 // We want the materialization to happen in the exit. So, before calling the thing that
28 // causes the materialization, we call bar(). We've never profiled this call at the time
29 // of FTL compilation, so this should be an exit.
42 if (result
!= sumOfArithSeries(n
- 1))
43 throw "Error: bad result: " + result
;