// output values
// special case 0 and 1st value
if (length == 0) {
return;
}
SlotKind arrayElementKind = typeInfo.slotKinds[1];
final int endi = iHeap + length + 2;
switch (arrayElementKind) {
// NOTE: short, byte, boolean, long, double arrays not stored on the heap
case Slot_HeapRef: case Slot_Int:
{
int prev = (iPrevHeap == 0) ? 0 :
(heap[iPrevHeap + 1] == 0) ? 0 : // prev length is 0
getPrevIntValue(iHeap, 2);
// heap[iPrevHeap + 2]; // use prev array 1st element
final int startIheap = iHeap + 2;
for (int i = startIheap; i < endi; i++) {
final int maybeConverted = writeIntOrHeapRef(arrayElementKind.ordinal(), i, prev);
if (isUpdatePrevOK && (i == startIheap)) {
updatePrevIntValue(iHeap, 2, maybeConverted);
}
prev = maybeConverted;
}