michael@0: // |jit-test| error: TypeError michael@0: function start() { michael@0: MAX_TOTAL_TIME = startTime = new Date michael@0: do { michael@0: if (rnd(0)) return (a[rnd()])() michael@0: lastTime = new Date michael@0: } while ( lastTime - startTime < MAX_TOTAL_TIME ) michael@0: } michael@0: function MersenneTwister19937() { michael@0: this.init_genrand = function() { michael@0: for (mti = 1; mti < 4; mti++) { michael@0: Array[mti] = 1 michael@0: } michael@0: }; michael@0: this.genrand_int32_t = function() { michael@0: if (mti > 4) { michael@0: mti = 0 michael@0: } michael@0: return Array[mti++]; michael@0: } michael@0: } (function() { michael@0: fuzzMT = new MersenneTwister19937; michael@0: fuzzMT.init_genrand() michael@0: rnd = function() { michael@0: return Math.floor(fuzzMT.genrand_int32()) michael@0: } michael@0: } ()) michael@0: function weighted(wa) { michael@0: a = [] michael@0: for (i = 0; i < wa.length; ++i) { michael@0: for (var j = 0; j < 8; ++j) { michael@0: a.push(wa[i].fun) michael@0: } michael@0: } michael@0: } michael@0: statementMakers = weighted([{ michael@0: fun: function makeMixedTypeArray() { [[, , , , , , , , , , , , , , , , , , , michael@0: , , , , , ""][(a[rnd()])()]]} michael@0: }]) michael@0: start() michael@0: michael@0: /* Don't assert. */ michael@0: