Blocks :
|
|
Blocks :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
When instantiating arrays from Java, we have to zero the backing storage to match JLS requirements. In some cases, like with the subsequent arraycopy, we are able to remove zeroing. However, in a generic case where a complicated processing is done after allocation, compilers are unable to figure out the array is covered completely. See JDK-8150463 for a motivational example of this. It might make sense to allow new Unsafe method that will return uninitialized arrays to trusted Java code. Patches: http://cr.openjdk.java.net/~shade/8150465/webrev.jdk.03/ http://cr.openjdk.java.net/~shade/8150465/webrev.hs.04/ Notes: http://cr.openjdk.java.net/~shade/8150465/notes.txt
|