changeset 5061:3be3b8a032a5 jdk7u55-b04

8029858: Enhance array copies Summary: Just read the source element once Reviewed-by: coleenp, ahgross
author dsimms
date Fri, 10 Jan 2014 15:38:30 +0100
parents 46236fe5d1fe
children fa17e3e38bb2
files src/share/vm/oops/objArrayKlass.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/oops/objArrayKlass.cpp	Thu Jan 09 07:55:58 2014 -0800
+++ b/src/share/vm/oops/objArrayKlass.cpp	Fri Jan 10 15:38:30 2014 +0100
@@ -149,7 +149,7 @@
         if (element_is_null ||
             Klass::cast((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);