js/src/jit-test/tests/jaeger/bug587431.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 function g() {
     2   var UPPER_MASK = 2147483648
     3   var mt = new Array
     4   function f1(n1) {
     5     return n1 < 0 ? (n1 ^ UPPER_MASK) + UPPER_MASK: n1
     6   }
     7   function f2(n1, n2) {
     8     return f1(n1 + n2 & 4294967295)
     9   }
    10   function f3(n1, n2) {
    11     var sum
    12     for (var i = 0; i < 32; ++i) {
    13       sum = f2(sum, f1(n2 << i))
    14     }
    15     return sum
    16   }
    17   this.init_genrand = function(s) {
    18     mt[0] = f1(s & 96295)
    19     for (mti = 1; mti < 6; mti++) {
    20       mt[mti] = f2(f3(3, f1(mt[mti - 1] ^ mt[1] > 0)), mti)
    21     }
    22   }
    23 } (function() {
    24   var fuzzMT = new g;
    25   fuzzMT.init_genrand(54)
    26 } ())
    28 /* Don't assert. */

mercurial