< prev index next >

src/hotspot/share/oops/typeArrayKlass.cpp

Print this page
*** 169,11 ***
    size_t dst_offset = arrayOopDesc::base_offset_in_bytes(element_type()) + ((size_t)dst_pos << l2es);
    ArrayAccess<ARRAYCOPY_ATOMIC>::arraycopy<void>(s, src_offset, d, dst_offset, (size_t)length << l2es);
  }
  
  size_t TypeArrayKlass::oop_size(oop obj) const {
!   assert(obj->is_typeArray(),"must be a type array");
    typeArrayOop t = typeArrayOop(obj);
    return t->object_size(this);
  }
  
  void TypeArrayKlass::initialize(TRAPS) {
--- 169,12 ---
    size_t dst_offset = arrayOopDesc::base_offset_in_bytes(element_type()) + ((size_t)dst_pos << l2es);
    ArrayAccess<ARRAYCOPY_ATOMIC>::arraycopy<void>(s, src_offset, d, dst_offset, (size_t)length << l2es);
  }
  
  size_t TypeArrayKlass::oop_size(oop obj) const {
!   // In this assert, we cannot safely access the Klass* with compact headers.
+   assert(UseCompactObjectHeaders || obj->is_typeArray(),"must be a type array");
    typeArrayOop t = typeArrayOop(obj);
    return t->object_size(this);
  }
  
  void TypeArrayKlass::initialize(TRAPS) {
< prev index next >