// This test runs a lot of code and is very slow with --ion-eager. Use a minimum // Ion warmup trigger of 5 to avoid timeouts. if (getJitCompilerOptions()["ion.warmup.trigger"] < 5)
setJitCompilerOption("ion.warmup.trigger", 5);
var ab = new ArrayBuffer(BUF_MIN);
// Compute a set of interesting indices.
indices = [0] for (var i of [4,1024,BUF_MIN,Math.pow(2,30),Math.pow(2,31),Math.pow(2,32),Math.pow(2,33)]) { for (var j of [-2,-1,0,1,2]) { for (var k of [1,-1])
indices.push((i+j)*k);
}
}
function testInt(ctor, shift, scale, disp) { var arr = new ctor(ab);
function test(tester, ctor, shift) { var arr = new ctor(ab); for (var i = 0; i < arr.length; i++)
arr[i] = Math.imul(i, Math.imul((i & 1), 2) - 1); for (scale of [0,1,2,3]) { for (disp of [0,1,2,8,Math.pow(2,30),Math.pow(2,31)-1,Math.pow(2,31),Math.pow(2,32)-1])
tester(ctor, shift, scale, disp);
} for (var i = 0; i < arr.length; i++) { var v = arr[i];
arr[i] = Math.imul(i, Math.imul((i & 1), 2) - 1);
assertEq(arr[i], v);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.