-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathCopyOnAccessArray_cache_index_overflow.js
53 lines (48 loc) · 1.45 KB
/
CopyOnAccessArray_cache_index_overflow.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
// -force:CopyOnAccessArray -testtrace:CopyOnAccessArray
function test ()
{
var arr=[];
arr[0]=[1,2,3,4,5];
arr[1]=[1,2,3,4,5];
arr[2]=[1,2,3,4,5];
arr[3]=[1,2,3,4,5];
arr[4]=[1,2,3,4,5];
arr[5]=[1,2,3,4,5];
arr[6]=[1,2,3,4,5];
arr[7]=[1,2,3,4,5];
arr[8]=[1,2,3,4,5];
arr[9]=[1,2,3,4,5];
arr[10]=[1,2,3,4,5];
arr[11]=[1,2,3,4,5];
arr[12]=[1,2,3,4,5];
arr[13]=[1,2,3,4,5];
arr[14]=[1,2,3,4,5];
arr[15]=[1,2,3,4,5];
arr[16]=[1,2,3,4,5];
arr[17]=[1,2,3,4,5];
arr[18]=[1,2,3,4,5];
arr[19]=[1,2,3,4,5];
arr[20]=[1,2,3,4,5];
arr[21]=[1,2,3,4,5];
arr[22]=[1,2,3,4,5];
arr[23]=[1,2,3,4,5];
arr[24]=[1,2,3,4,5];
arr[25]=[1,2,3,4,5];
arr[26]=[1,2,3,4,5];
arr[27]=[1,2,3,4,5];
arr[28]=[1,2,3,4,5];
arr[29]=[1,2,3,4,5];
arr[30]=[1,2,3,4,5];
arr[31]=[1,2,3,4,5];
arr[32]=[1,2,3,4,5];
arr[33]=[1,2,3,4,5];
for (var i=0; i<32; i++)
{
arr[i][0]=0; // Conversion of copy-on-access array should be transparent
}
}
test();