Index: vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp =================================================================== --- vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp (revision 611159) +++ vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp (working copy) @@ -1645,8 +1645,8 @@ // // Try some optimizations for System::arraycopy(...), Min, Max, Abs... // - if (!compilationInterface.needWriteBarriers() //genArrayCopyRepMove is not ready to work in WB mode - && translationFlags.genArrayCopyRepMove == true + + if (translationFlags.genArrayCopyRepMove == true && genArrayCopyRepMove(methodDesc,numArgs,srcOpnds)) { return; } else if (translationFlags.genArrayCopy == true && @@ -2392,8 +2392,15 @@ ArrayType* dstAsArrayType = dstType->asArrayType(); bool srcIsArrOfPrimitive = srcIsArray && VMInterface::isArrayOfPrimitiveElements(srcAsArrayType->getVMTypeHandle()); bool dstIsArrOfPrimitive = dstIsArray && VMInterface::isArrayOfPrimitiveElements(dstAsArrayType->getVMTypeHandle()); - if ( !(srcIsArray && dstIsArray) ) { - throwsASE = true; + + if ( !(srcIsArrOfPrimitive && dstIsArrOfPrimitive) ) + { + throwsASE = true; + } + + /* + // This functionality was implemented before. + if ( !(srcIsArray && dstIsArray) ) { } else if ( srcIsArrOfPrimitive ) { if( !dstIsArrOfPrimitive || srcType != dstType ) throwsASE = true; @@ -2407,6 +2414,7 @@ NamedType* dstElemType = dstAsArrayType->getElementType(); throwsASE = srcElemType->getVMTypeHandle() != dstElemType->getVMTypeHandle(); } + */ if ( throwsASE ) return false; else