< prev index next >

src/hotspot/share/oops/oop.inline.hpp

Print this page
*** 81,11 ***
  markWord oopDesc::cas_set_mark(markWord new_mark, markWord old_mark, atomic_memory_order order) {
    return Atomic::cmpxchg(&_mark, old_mark, new_mark, order);
  }
  
  void oopDesc::init_mark() {
!   set_mark(markWord::prototype());
  }
  
  Klass* oopDesc::klass() const {
    if (UseCompressedClassPointers) {
      return CompressedKlassPointers::decode_not_null(_metadata._compressed_klass);
--- 81,11 ---
  markWord oopDesc::cas_set_mark(markWord new_mark, markWord old_mark, atomic_memory_order order) {
    return Atomic::cmpxchg(&_mark, old_mark, new_mark, order);
  }
  
  void oopDesc::init_mark() {
!   set_mark(Klass::default_prototype_header(klass()));
  }
  
  Klass* oopDesc::klass() const {
    if (UseCompressedClassPointers) {
      return CompressedKlassPointers::decode_not_null(_metadata._compressed_klass);

*** 207,10 ***
--- 207,25 ---
  bool oopDesc::is_stackChunk()  const { return klass()->is_stack_chunk_instance_klass(); }
  bool oopDesc::is_array()       const { return klass()->is_array_klass();                }
  bool oopDesc::is_objArray()    const { return klass()->is_objArray_klass();             }
  bool oopDesc::is_typeArray()   const { return klass()->is_typeArray_klass();            }
  
+ bool oopDesc::is_inline_type() const { return mark().is_inline_type(); }
+ #ifdef _LP64
+ bool oopDesc::is_flatArray() const {
+   markWord mrk = mark();
+   return (mrk.is_unlocked()) ? mrk.is_flat_array() : klass()->is_flatArray_klass();
+ }
+ bool oopDesc::is_null_free_array() const {
+   markWord mrk = mark();
+   return (mrk.is_unlocked()) ? mrk.is_null_free_array() : klass()->is_null_free_array_klass();
+ }
+ #else
+ bool oopDesc::is_flatArray()       const { return klass()->is_flatArray_klass(); }
+ bool oopDesc::is_null_free_array() const { return klass()->is_null_free_array_klass(); }
+ #endif
+ 
  template<typename T>
  T*       oopDesc::field_addr(int offset)     const { return reinterpret_cast<T*>(cast_from_oop<intptr_t>(as_oop()) + offset); }
  
  template <typename T>
  size_t   oopDesc::field_offset(T* p) const { return pointer_delta((void*)p, (void*)this, 1); }
< prev index next >