Mercurial > hg > graal-compiler
diff src/share/vm/oops/objArrayKlass.cpp @ 17536:b478fbd63109
8029858: Enhance array copies
Summary: Just read the source element once
Reviewed-by: coleenp, ahgross
author | dsimms |
---|---|
date | Fri, 10 Jan 2014 11:15:12 +0100 |
parents | 55fb97c4c58d |
children | 562643f42b65 a18dafb24f80 |
line wrap: on
line diff
--- a/src/share/vm/oops/objArrayKlass.cpp Tue Jan 07 13:30:46 2014 -0800 +++ b/src/share/vm/oops/objArrayKlass.cpp Fri Jan 10 11:15:12 2014 +0100 @@ -269,7 +269,7 @@ 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);