mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8029858: Enhance array copies
Just read the source element once Reviewed-by: coleenp, ahgross
This commit is contained in:
parent
9099e9ddcc
commit
6005ba852d
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue