< prev index next >

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

Print this page
@@ -75,11 +75,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());
+   set_mark(Klass::default_prototype_header(klass()));
  }
  
  Klass* oopDesc::klass() const {
    if (UseCompressedClassPointers) {
      return CompressedKlassPointers::decode_not_null(_metadata._compressed_klass);

@@ -206,10 +206,25 @@
  bool oopDesc::is_instance()  const { return klass()->is_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
+ 
  void*    oopDesc::field_addr(int offset)     const { return reinterpret_cast<void*>(cast_from_oop<intptr_t>(as_oop()) + offset); }
  
  template <class T>
  T*       oopDesc::obj_field_addr(int offset) const { return (T*) field_addr(offset); }
  
< prev index next >