blob: 2d2706f903752184359e0c4d5c27b1171c922aba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// |jit-test| slow
// Ensure Warp JIT code handles |new Int32Array(INT32_MAX)| correctly.
function test(len) {
var ta;
for (var i = 0; i < 2149; i++) {
if (i % 1024 === 100) {
// Constant length.
ta = new Int32Array(0x7fff_ffff);
assertEq(ta.length, 0x7fff_ffff);
ta[0x7fff_fffe] = i;
assertEq(ta[0x7fff_fffe], i);
// Variable length.
ta = new Int32Array(len - i);
assertEq(ta.length, len - i);
ta[ta.length - 1] = i;
assertEq(ta[ta.length - 1], i);
}
}
}
test(0x7fff_ffff);
|