@@ -99,10 +99,10 @@ class VM_UnsafeAPI
99
99
return 0 == ((offset - arrayBase (currentThread)) % ((UDATA)1 << logElementSize));
100
100
}
101
101
102
- static VMINLINE I_32
102
+ static VMINLINE UDATA
103
103
convertOffsetToIndex (J9VMThread *currentThread, UDATA offset, UDATA logElementSize)
104
104
{
105
- return (I_32 )((offset - arrayBase (currentThread)) >> logElementSize);
105
+ return (UDATA )((offset - arrayBase (currentThread)) >> logElementSize);
106
106
}
107
107
108
108
static VMINLINE I_32
@@ -139,7 +139,7 @@ class VM_UnsafeAPI
139
139
/* Array access */
140
140
if (offsetIsAlignedArrayIndex (currentThread, offset, logElementSize)) {
141
141
/* Aligned array access */
142
- I_32 index = convertOffsetToIndex (currentThread, offset, logElementSize);
142
+ UDATA index = convertOffsetToIndex (currentThread, offset, logElementSize);
143
143
switch (logElementSize) {
144
144
case 0 :
145
145
if (isSigned) {
@@ -165,7 +165,7 @@ class VM_UnsafeAPI
165
165
}
166
166
} else {
167
167
/* Unaligned array access - unreachable for logElementSize == 0 */
168
- I_32 index = convertOffsetToIndex (currentThread, offset, 0 );
168
+ UDATA index = convertOffsetToIndex (currentThread, offset, 0 );
169
169
if (1 == logElementSize) {
170
170
I_16 temp = 0 ;
171
171
VM_ArrayCopyHelpers::memcpyFromArray (currentThread, object, (UDATA)0 , index, (I_32)sizeof (temp), (void *)&temp);
@@ -210,7 +210,7 @@ class VM_UnsafeAPI
210
210
/* Array access */
211
211
if (offsetIsAlignedArrayIndex (currentThread, offset, logElementSize)) {
212
212
/* Aligned array access */
213
- I_32 index = convertOffsetToIndex (currentThread, offset, logElementSize);
213
+ UDATA index = convertOffsetToIndex (currentThread, offset, logElementSize);
214
214
switch (logElementSize) {
215
215
case 0 :
216
216
if (isSigned) {
@@ -236,7 +236,7 @@ class VM_UnsafeAPI
236
236
}
237
237
} else {
238
238
/* Unaligned array access - unreachable for logElementSize == 0 */
239
- I_32 index = convertOffsetToIndex (currentThread, offset, 0 );
239
+ UDATA index = convertOffsetToIndex (currentThread, offset, 0 );
240
240
if (1 == logElementSize) {
241
241
I_16 temp = (I_16)value;
242
242
VM_ArrayCopyHelpers::memcpyToArray (currentThread, object, (UDATA)0 , index, (I_32)sizeof (temp), (void *)&temp);
@@ -272,11 +272,11 @@ class VM_UnsafeAPI
272
272
/* Array access */
273
273
if (offsetIsAlignedArrayIndex (currentThread, offset, logElementSize)) {
274
274
/* Aligned array access */
275
- I_32 index = convertOffsetToIndex (currentThread, offset, logElementSize);
275
+ UDATA index = convertOffsetToIndex (currentThread, offset, logElementSize);
276
276
value = objectAccessBarrier->inlineIndexableObjectReadI64 (currentThread, object, index, isVolatile);
277
277
} else {
278
278
/* Unaligned array access */
279
- I_32 index = convertOffsetToIndex (currentThread, offset, 0 );
279
+ UDATA index = convertOffsetToIndex (currentThread, offset, 0 );
280
280
VM_ArrayCopyHelpers::memcpyFromArray (currentThread, object, (UDATA)0 , index, (I_32)sizeof (value), (void *)&value); }
281
281
} else if (offset & J9_SUN_STATIC_FIELD_OFFSET_TAG) {
282
282
/* Static field */
@@ -305,11 +305,11 @@ class VM_UnsafeAPI
305
305
/* Array access */
306
306
if (offsetIsAlignedArrayIndex (currentThread, offset, logElementSize)) {
307
307
/* Aligned array access */
308
- I_32 index = convertOffsetToIndex (currentThread, offset, logElementSize);
308
+ UDATA index = convertOffsetToIndex (currentThread, offset, logElementSize);
309
309
objectAccessBarrier->inlineIndexableObjectStoreI64 (currentThread, object, index, value, isVolatile);
310
310
} else {
311
311
/* Unaligned array access */
312
- I_32 index = convertOffsetToIndex (currentThread, offset, 0 );
312
+ UDATA index = convertOffsetToIndex (currentThread, offset, 0 );
313
313
VM_ArrayCopyHelpers::memcpyToArray (currentThread, object, (UDATA)0 , index, (I_32)sizeof (value), (void *)&value);
314
314
}
315
315
} else if (offset & J9_SUN_STATIC_FIELD_OFFSET_TAG) {
@@ -554,7 +554,7 @@ class VM_UnsafeAPI
554
554
} else {
555
555
if (VM_VMHelpers::objectIsArray (currentThread, object)) {
556
556
/* Aligned array access */
557
- I_32 index = convertOffsetToIndex (currentThread, offset, logElementSize);
557
+ UDATA index = convertOffsetToIndex (currentThread, offset, logElementSize);
558
558
result = objectAccessBarrier->inlineIndexableObjectCompareAndSwapU64 (currentThread, object, index, compareValue, swapValue, true );
559
559
} else if (offset & J9_SUN_STATIC_FIELD_OFFSET_TAG) {
560
560
/* Static field */
@@ -583,7 +583,7 @@ class VM_UnsafeAPI
583
583
} else {
584
584
if (VM_VMHelpers::objectIsArray (currentThread, object)) {
585
585
/* Aligned array access */
586
- I_32 index = convertOffsetToIndex (currentThread, offset, logElementSize);
586
+ UDATA index = convertOffsetToIndex (currentThread, offset, logElementSize);
587
587
result = objectAccessBarrier->inlineIndexableObjectCompareAndSwapU32 (currentThread, object, index, compareValue, swapValue, true );
588
588
} else if (offset & J9_SUN_STATIC_FIELD_OFFSET_TAG) {
589
589
/* Static field */
@@ -641,7 +641,7 @@ class VM_UnsafeAPI
641
641
} else {
642
642
if (VM_VMHelpers::objectIsArray (currentThread, object)) {
643
643
/* Aligned array access */
644
- I_32 index = convertOffsetToIndex (currentThread, offset, logElementSize);
644
+ UDATA index = convertOffsetToIndex (currentThread, offset, logElementSize);
645
645
result = objectAccessBarrier->inlineIndexableObjectCompareAndExchangeU32 (currentThread, object, index, compareValue, swapValue, true );
646
646
} else if (offset & J9_SUN_STATIC_FIELD_OFFSET_TAG) {
647
647
/* Static field */
@@ -672,7 +672,7 @@ class VM_UnsafeAPI
672
672
} else {
673
673
if (VM_VMHelpers::objectIsArray (currentThread, object)) {
674
674
/* Aligned array access */
675
- I_32 index = convertOffsetToIndex (currentThread, offset, logElementSize);
675
+ UDATA index = convertOffsetToIndex (currentThread, offset, logElementSize);
676
676
result = objectAccessBarrier->inlineIndexableObjectCompareAndExchangeU64 (currentThread, object, index, compareValue, swapValue, true );
677
677
} else if (offset & J9_SUN_STATIC_FIELD_OFFSET_TAG) {
678
678
/* Static field */
0 commit comments