| //@ skip if $architecture == "x86" |
| function sumOfArithSeries(limit) { |
| return limit * (limit + 1) / 2; |
| throw "Error: q.f == q.g"; |
| throw "Error: q.f.f != q.g.f"; |
| throw "Error: q.f.f.f != i"; |
| for (var i = 0; i < n; ++i) { |
| // We want the materialization to happen in the exit. So, before calling the thing that |
| // causes the materialization, we call bar(). We've never profiled this call at the time |
| // of FTL compilation, so this should be an exit. |
| if (result != sumOfArithSeries(n - 1)) |
| throw "Error: bad result: " + result; |