public static void arraycopy(Object[] src, int srcPos, Object[] dst, int dstPos, int len) {
public static void arraycopy(byte[] src, int srcPos, byte[] dst, int dstPos, int len) {
  public static void arraycopy(Object[] src, int srcPos, Object[] dst, int dstPos, int len) {    // Don't do any of the assignments if the offsets and lengths    // are in error    if (srcPos >= 0 && dstPos >= 0 && len >= 0 && 	(srcPos+len) <= src.length && (dstPos+len) <= dst.length) {      int dstStart,dstEnd;      try {	VM_Type lhs =VM_Magic.getObjectType(dst).asArray().getElementType();	VM_Type rhs =VM_Magic.getObjectType(src).asArray().getElementType();	if ((lhs==rhs) || 	    (lhs == VM_Type.JavaLangObjectType) || 	    VM_Runtime.isAssignableWith(lhs, rhs)) {	  	  if (len == 0) return;	  if (VM_Collector.NEEDS_WRITE_BARRIER) {	    dstStart = dstPos;           	    dstEnd = dstPos + len - 1;	    VM.disableGC();     // prevent GC until writebarrier updated	  }	  // handle as two cases, for efficiency and in case subarrays overlap	  if ((! VM.BuildForRealtimeGC) && (src != dst || srcPos > dstPos)) {	    VM_Memory.aligned32Copy(VM_Magic.objectAsAddress(dst).add(dstPos<<2),				    VM_Magic.objectAsAddress(src).add(srcPos<<2),				    len<<2);	    if (VM.BuildForConcurrentGC) { // dfb: must increment for copied pointers		VM_Address start = VM_Magic.objectAsAddress(dst).add(dstPos<<2);		VM_Address end = start.add(len<<2);		VM_Processor p = VM_Processor.getCurrentProcessor();		int diff = end.diff(start);		for (int i = 0; i < diff; i += 4) {		//-#if RVM_WITH_CONCURRENT_GC // because VM_RCBuffers only available with concurrent memory managers		VM_RCBuffers.addIncrement(VM_Magic.getMemoryAddress(start.add(i)), p);		//-#endif	      }	    }	  } else if (srcPos < dstPos) {	    srcPos = (srcPos + len) << 2;	    dstPos = (dstPos + len) << 2;	    while (len-- != 0) {	      srcPos -= 4;	      dstPos -= 4;	      if (! VM.BuildForRealtimeGC)		  VM_Magic.setObjectAtOffset(dst, dstPos, VM_Magic.getObjectAtOffset(src, srcPos));	      else		  dst[dstPos>>2] = src[srcPos>>2];	      if (VM.BuildForConcurrentGC) {		//-#if RVM_WITH_CONCURRENT_GC // because VM_RCBuffers only available with concurrent memory managers		VM_RCBuffers.addIncrement(VM_Magic.getMemoryAddress(VM_Magic.objectAsAddress(dst).add(dstPos)),					  VM_Processor.getCurrentProcessor());		//-#endif	      }	    }	  } else {	    while (len-- != 0)	      dst[dstPos++] = src[srcPos++];	  }	  if (VM_Collector.NEEDS_WRITE_BARRIER) {	    // generate write buffer entries for modified target array entries	    VM_WriteBarrier.arrayCopyWriteBarrier(dst, dstStart, dstEnd);	    VM.enableGC();	  }	} else { 	  // not sure if copy might cause ArrayStoreException, must handle with	  // element by element assignments, in the right order.	  // handle as two cases, in case subarrays overlap	  if (src != dst || srcPos > dstPos) {	    while (len-- != 0)	      dst[dstPos++] = src[srcPos++];	  } else {	    VM_Array ary = VM_Magic.getObjectType(src).asArray();	    Object temp[] = 	      (Object[])VM_Runtime.quickNewArray(len, ary.getInstanceSize(len), 						 ary.getTypeInformationBlock());	    int cnt = len;	    int tempPos = 0;	    while (cnt-- != 0)	      temp[tempPos++] = src[srcPos++];	    tempPos = 0;	    while (len-- != 0)	      dst[dstPos++] = temp[tempPos++];	  }	}      } catch (VM_ResolutionException e) {	failWithNoClassDefFoundError(e);      }    } else {      failWithIndexOutOfBoundsException();    }  }