< prev index next >

src/hotspot/share/oops/objArrayKlass.hpp

Print this page
rev 50331 : 8198285: More consistent Access API for arraycopy


  71   int oop_size(oop obj) const;
  72 
  73   // Allocation
  74   static Klass* allocate_objArray_klass(ClassLoaderData* loader_data,
  75                                           int n, Klass* element_klass, TRAPS);
  76 
  77   objArrayOop allocate(int length, TRAPS);
  78   oop multi_allocate(int rank, jint* sizes, TRAPS);
  79 
  80   // Copying
  81   void  copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS);
  82 
  83   // Compute protection domain
  84   oop protection_domain() const { return bottom_klass()->protection_domain(); }
  85 
  86   virtual void metaspace_pointers_do(MetaspaceClosure* iter);
  87 
  88  private:
  89   // Either oop or narrowOop depending on UseCompressedOops.
  90   // must be called from within ObjArrayKlass.cpp
  91   template <class T> void do_copy(arrayOop s, T* src, arrayOop d,
  92                                   T* dst, int length, TRAPS);

  93  protected:
  94   // Returns the ObjArrayKlass for n'th dimension.
  95   virtual Klass* array_klass_impl(bool or_null, int n, TRAPS);
  96 
  97   // Returns the array class with this class as element type.
  98   virtual Klass* array_klass_impl(bool or_null, TRAPS);
  99 
 100  public:
 101 
 102   static ObjArrayKlass* cast(Klass* k) {
 103     return const_cast<ObjArrayKlass*>(cast(const_cast<const Klass*>(k)));
 104   }
 105 
 106   static const ObjArrayKlass* cast(const Klass* k) {
 107     assert(k->is_objArray_klass(), "cast to ObjArrayKlass");
 108     return static_cast<const ObjArrayKlass*>(k);
 109   }
 110 
 111   // Sizing
 112   static int header_size()                { return sizeof(ObjArrayKlass)/wordSize; }




  71   int oop_size(oop obj) const;
  72 
  73   // Allocation
  74   static Klass* allocate_objArray_klass(ClassLoaderData* loader_data,
  75                                           int n, Klass* element_klass, TRAPS);
  76 
  77   objArrayOop allocate(int length, TRAPS);
  78   oop multi_allocate(int rank, jint* sizes, TRAPS);
  79 
  80   // Copying
  81   void  copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS);
  82 
  83   // Compute protection domain
  84   oop protection_domain() const { return bottom_klass()->protection_domain(); }
  85 
  86   virtual void metaspace_pointers_do(MetaspaceClosure* iter);
  87 
  88  private:
  89   // Either oop or narrowOop depending on UseCompressedOops.
  90   // must be called from within ObjArrayKlass.cpp
  91   template <class T> void do_copy(arrayOop s, size_t src_offset,
  92                                   arrayOop d, size_t dst_offset,
  93                                   int length, TRAPS);
  94  protected:
  95   // Returns the ObjArrayKlass for n'th dimension.
  96   virtual Klass* array_klass_impl(bool or_null, int n, TRAPS);
  97 
  98   // Returns the array class with this class as element type.
  99   virtual Klass* array_klass_impl(bool or_null, TRAPS);
 100 
 101  public:
 102 
 103   static ObjArrayKlass* cast(Klass* k) {
 104     return const_cast<ObjArrayKlass*>(cast(const_cast<const Klass*>(k)));
 105   }
 106 
 107   static const ObjArrayKlass* cast(const Klass* k) {
 108     assert(k->is_objArray_klass(), "cast to ObjArrayKlass");
 109     return static_cast<const ObjArrayKlass*>(k);
 110   }
 111 
 112   // Sizing
 113   static int header_size()                { return sizeof(ObjArrayKlass)/wordSize; }


< prev index next >