1. A system for compiling bytecode, comprising: a computing environment which includes one or more physical computing devices having one or more processors; a virtual machine that includes a compiler and a memory heap for storage of a compiled bytecode; and wherein the compiler, during compilation of the bytecode, scans the bytecode for array copy calls, locates, in the bytecode, an array copy call which indicates a source array, and a target array, determines a source array length and a target array length, and that the source array length is one of greater than or equal to the target array length, and analyzes the array copy call to determine that the source array does not escape; and wherein in response to determining that the source array does not escape, and that the source array length is one of greater than or equal to the target array length, the compiler generates machine code which reuses the source array for the target array, by replacing the array copy call with an assignment of the source array as the target array, and when the source array length is determined to be greater than the target array length, inserts, during the compilation of the bytecode, a cut operation into the generated machine code that writes a value indicative of the source array length to equal that of the target array length, to reduce the length of the source array within the heap.