~ubuntu-branches/ubuntu/trusty/mozjs24/trusty-proposed

« back to all changes in this revision

Viewing changes to js/src/jit-test/tests/ion/invalidation/recursive-invalidate.js

  • Committer: Package Import Robot
  • Author(s): Tim Lunn
  • Date: 2014-02-11 21:55:34 UTC
  • Revision ID: package-import@ubuntu.com-20140211215534-m1zyq5aj59md3y07
Tags: upstream-24.2.0
ImportĀ upstreamĀ versionĀ 24.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
var causeOSI = true;
 
2
 
 
3
function rec(x, self) {
 
4
    if (x === 0 || x !== x) {
 
5
        if (causeOSI) {
 
6
            causeOSI = false;
 
7
            self(NaN, self)
 
8
            causeOSI = true;
 
9
        }
 
10
        return;
 
11
    }
 
12
    self(x - 1, self);
 
13
}
 
14
 
 
15
// Use enough iterations to type infer the script.
 
16
causeOSI = false;
 
17
for (var i = 0; i < 20; ++i)
 
18
    rec(1, rec);
 
19
causeOSI = true;
 
20
 
 
21
rec(2, rec)