RFR: Always copy forward for disjoint arrays

Zhengyu Gu zgu at redhat.com
Fri Nov 9 20:24:36 UTC 2018


For disjoint array copying, it can only copy forward, due to checkcast.

For example:

a[]: array of Integer
b[]: array of Object, but b[0] contains Integer object, and the rest of 
elements are not Integers.

when copy b => a, it expects b[0] is copied to a[0], but aborts 
afterward, due to incompatible type.

If copying backward, none of them are copied.

Webrev: 
http://cr.openjdk.java.net/~zgu/shenandoah/disjoint_arraycopy/webrev.00/index.html


Test:

   tier3_gc_shenandoah (fastdebug and release)

Thanks,

-Zhengyu


More information about the shenandoah-dev mailing list