src/hotspot/share/oops/typeArrayKlass.hpp
changeset 50752 9d62da00bf15
parent 49982 9042ffe5b7fe
child 51554 5b0d86499960
equal deleted inserted replaced
50751:d9132bdf6c30 50752:9d62da00bf15
    31 // A TypeArrayKlass is the klass of a typeArray
    31 // A TypeArrayKlass is the klass of a typeArray
    32 // It contains the type and size of the elements
    32 // It contains the type and size of the elements
    33 
    33 
    34 class TypeArrayKlass : public ArrayKlass {
    34 class TypeArrayKlass : public ArrayKlass {
    35   friend class VMStructs;
    35   friend class VMStructs;
       
    36 
       
    37  public:
       
    38   static const KlassID ID = TypeArrayKlassID;
       
    39 
    36  private:
    40  private:
    37   jint _max_length;            // maximum number of elements allowed in an array
    41   jint _max_length;            // maximum number of elements allowed in an array
    38 
    42 
    39   // Constructor
    43   // Constructor
    40   TypeArrayKlass(BasicType type, Symbol* name);
    44   TypeArrayKlass(BasicType type, Symbol* name);
    85   // Oop iterators. Since there are no oops in TypeArrayKlasses,
    89   // Oop iterators. Since there are no oops in TypeArrayKlasses,
    86   // these functions only return the size of the object.
    90   // these functions only return the size of the object.
    87 
    91 
    88  private:
    92  private:
    89   // The implementation used by all oop_oop_iterate functions in TypeArrayKlasses.
    93   // The implementation used by all oop_oop_iterate functions in TypeArrayKlasses.
    90   inline void oop_oop_iterate_impl(oop obj, ExtendedOopClosure* closure);
    94   inline void oop_oop_iterate_impl(oop obj, OopIterateClosure* closure);
    91 
    95 
       
    96  public:
    92   // Wraps oop_oop_iterate_impl to conform to macros.
    97   // Wraps oop_oop_iterate_impl to conform to macros.
    93   template <bool nv, typename OopClosureType>
    98   template <typename T, typename OopClosureType>
    94   inline void oop_oop_iterate(oop obj, OopClosureType* closure);
    99   inline void oop_oop_iterate(oop obj, OopClosureType* closure);
    95 
   100 
    96   // Wraps oop_oop_iterate_impl to conform to macros.
   101   // Wraps oop_oop_iterate_impl to conform to macros.
    97   template <bool nv, typename OopClosureType>
   102   template <typename T, typename OopClosureType>
    98   inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr);
   103   inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr);
    99 
   104 
   100  public:
   105   // Wraps oop_oop_iterate_impl to conform to macros.
   101 
   106   template <typename T, typename OopClosureType>
   102   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
   107   inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure);
   103   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
       
   104   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_RANGE)
       
   105   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_RANGE)
       
   106 
       
   107 #if INCLUDE_OOP_OOP_ITERATE_BACKWARDS
       
   108   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_NO_BACKWARDS)
       
   109   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_NO_BACKWARDS)
       
   110 #endif
       
   111 
       
   112 
   108 
   113  protected:
   109  protected:
   114   // Find n'th dimensional array
   110   // Find n'th dimensional array
   115   virtual Klass* array_klass_impl(bool or_null, int n, TRAPS);
   111   virtual Klass* array_klass_impl(bool or_null, int n, TRAPS);
   116 
   112