8029858: Enhance array copies

Just read the source element once

Reviewed-by: coleenp, ahgross
This commit is contained in:
David Simms 2014-01-10 15:58:40 +01:00
parent 9099e9ddcc
commit 6005ba852d

View file

@ -269,7 +269,7 @@ template <class T> void ObjArrayKlass::do_copy(arrayOop s, T* src,
if (element_is_null ||
(new_val->klass())->is_subtype_of(bound)) {
bs->write_ref_field_pre(p, new_val);
*p = *from;
*p = element;
} else {
// We must do a barrier to cover the partial copy.
const size_t pd = pointer_delta(p, dst, (size_t)heapOopSize);