< prev index next >

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

Print this page
@@ -61,15 +61,46 @@
    } else {
      return nullptr;
    }
  }
  
- inline ObjArrayKlass* InstanceKlass::array_klasses_acquire() const {
+ inline InlineKlass* InstanceKlass::get_inline_type_field_klass(int idx) const {
+   assert(has_inline_type_fields(), "Sanity checking");
+   assert(idx < java_fields_count(), "IOOB");
+   InlineKlass* k = inline_type_field_klasses_array()->at(idx);
+   assert(k != nullptr, "Should always be set before being read");
+   return k;
+ }
+ 
+ inline InlineKlass* InstanceKlass::get_inline_type_field_klass_or_null(int idx) const {
+   assert(has_inline_type_fields(), "Sanity checking");
+   assert(idx < java_fields_count(), "IOOB");
+   InlineKlass* k = inline_type_field_klasses_array()->at(idx);
+   return k;
+ }
+ 
+ inline void InstanceKlass::set_inline_type_field_klass(int idx, InlineKlass* k) {
+   assert(has_inline_type_fields(), "Sanity checking");
+   assert(idx < java_fields_count(), "IOOB");
+   assert(k != nullptr, "Should not be set to nullptr");
+   assert(inline_type_field_klasses_array() != nullptr, "array must have been created");
+   assert(inline_type_field_klasses_array()->at(idx) == nullptr, "Should not be set twice");
+   inline_type_field_klasses_array()->at_put(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");
+   inline_type_field_klasses_array()->at_put(idx, nullptr);
+ }
+ 
+ 
+ inline ArrayKlass* InstanceKlass::array_klasses_acquire() const {
    return Atomic::load_acquire(&_array_klasses);
  }
  
- inline void InstanceKlass::release_set_array_klasses(ObjArrayKlass* k) {
+ 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 >