< prev index next >

src/hotspot/share/oops/valueArrayKlass.cpp

Print this page

        

@@ -246,16 +246,16 @@
            swap(src, src_end);
            dst = dst + (length << log2_element_size());
            do {
              src -= elem_incr;
              dst -= elem_incr;
-             s_elem_vklass->value_store(src, dst, element_byte_size(), true, false);
+             HeapAccess<>::value_copy(src, dst, s_elem_vklass);
            } while (src > src_end);
          } else {
            address src_end = src + (length << log2_element_size());
            while (src < src_end) {
-             s_elem_vklass->value_store(src, dst, element_byte_size(), true, false);
+             HeapAccess<>::value_copy(src, dst, s_elem_vklass);
              src += elem_incr;
              dst += elem_incr;
            }
          }
        } else {

@@ -269,13 +269,11 @@
        // Need to allocate each new src elem payload -> dst oop
        objArrayHandle dh(THREAD, (objArrayOop)d);
        valueArrayHandle sh(THREAD, sa);
        int dst_end = dst_pos + length;
        while (dst_pos < dst_end) {
-         oop o = s_elem_vklass->allocate_instance(CHECK);
-         s_elem_vklass->value_store(sh->value_at_addr(src_pos, layout_helper()),
-                                             s_elem_vklass->data_for_oop(o), true, true);
+         oop o = valueArrayOopDesc::value_copy_from_index(sh, src_pos, CHECK);
          dh->obj_at_put(dst_pos, o);
          dst_pos++;
          src_pos++;
        }
      }

@@ -296,11 +294,11 @@
        }
        // Check exact type per element
        if (se->klass() != d_elem_klass) {
          THROW(vmSymbols::java_lang_ArrayStoreException());
        }
-       d_elem_vklass->value_store(d_elem_vklass->data_for_oop(se), dst, true, false);
+       d_elem_vklass->value_copy_oop_to_payload(se, dst);
        dst += delem_incr;
        src_pos++;
      }
    }
 }
< prev index next >