< prev index next >

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

Print this page
*** 60,15 ***
    } else {
      return NULL;
    }
  }
  
! inline ObjArrayKlass* InstanceKlass::array_klasses_acquire() const {
    return Atomic::load_acquire(&_array_klasses);
  }
  
! inline void InstanceKlass::release_set_array_klasses(ObjArrayKlass* k) {
    Atomic::release_store(&_array_klasses, k);
  }
  
  inline jmethodID* InstanceKlass::methods_jmethod_ids_acquire() const {
    return Atomic::load_acquire(&_methods_jmethod_ids);
--- 60,60 ---
    } else {
      return NULL;
    }
  }
  
! inline address InstanceKlass::adr_inline_type_field_klasses() const {
+   if (has_inline_type_fields()) {
+     InstanceKlass* volatile* adr_impl = adr_implementor();
+     if (adr_impl != NULL) {
+       return (address)(adr_impl + 1);
+     }
+ 
+     return (address)end_of_nonstatic_oop_maps();
+   } else {
+     return NULL;
+   }
+ }
+ 
+ inline Klass* InstanceKlass::get_inline_type_field_klass(int idx) const {
+   assert(has_inline_type_fields(), "Sanity checking");
+   assert(idx < java_fields_count(), "IOOB");
+   Klass* k = ((Klass**)adr_inline_type_field_klasses())[idx];
+   assert(k != NULL, "Should always be set before being read");
+   assert(k->is_inline_klass(), "Must be an inline type");
+   return k;
+ }
+ 
+ inline Klass* InstanceKlass::get_inline_type_field_klass_or_null(int idx) const {
+   assert(has_inline_type_fields(), "Sanity checking");
+   assert(idx < java_fields_count(), "IOOB");
+   Klass* k = ((Klass**)adr_inline_type_field_klasses())[idx];
+   assert(k == NULL || k->is_inline_klass(), "Must be an inline type");
+   return k;
+ }
+ 
+ inline void InstanceKlass::set_inline_type_field_klass(int idx, Klass* k) {
+   assert(has_inline_type_fields(), "Sanity checking");
+   assert(idx < java_fields_count(), "IOOB");
+   assert(k != NULL, "Should not be set to NULL");
+   assert(((Klass**)adr_inline_type_field_klasses())[idx] == NULL, "Should not be set twice");
+   ((Klass**)adr_inline_type_field_klasses())[idx] = k;
+ }
+ 
+ inline void InstanceKlass::reset_inline_type_field_klass(int idx) {
+   assert(has_inline_type_fields(), "Sanity checking");
+   assert(idx < java_fields_count(), "IOOB");
+   ((Klass**)adr_inline_type_field_klasses())[idx] = NULL;
+ }
+ 
+ 
+ inline ArrayKlass* InstanceKlass::array_klasses_acquire() const {
    return Atomic::load_acquire(&_array_klasses);
  }
  
! inline void InstanceKlass::release_set_array_klasses(ArrayKlass* k) {
    Atomic::release_store(&_array_klasses, k);
  }
  
  inline jmethodID* InstanceKlass::methods_jmethod_ids_acquire() const {
    return Atomic::load_acquire(&_methods_jmethod_ids);
< prev index next >