< prev index next >

src/hotspot/share/oops/oop.hpp

Print this page




  99   inline oop list_ptr_from_klass();
 100 
 101   // size of object header, aligned to platform wordSize
 102   static int header_size() { return sizeof(oopDesc)/HeapWordSize; }
 103 
 104   // Returns whether this is an instance of k or an instance of a subclass of k
 105   inline bool is_a(Klass* k) const;
 106 
 107   // Returns the actual oop size of the object
 108   inline int size();
 109 
 110   // Sometimes (for complicated concurrency-related reasons), it is useful
 111   // to be able to figure out the size of an object knowing its klass.
 112   inline int size_given_klass(Klass* klass);
 113 
 114   // type test operations (inlined in oop.inline.hpp)
 115   inline bool is_instance()            const;
 116   inline bool is_array()               const;
 117   inline bool is_objArray()            const;
 118   inline bool is_typeArray()           const;


 119 
 120   // type test operations that don't require inclusion of oop.inline.hpp.
 121   bool is_instance_noinline()          const;
 122   bool is_array_noinline()             const;
 123   bool is_objArray_noinline()          const;
 124   bool is_typeArray_noinline()         const;


 125 
 126  protected:
 127   inline oop        as_oop() const { return const_cast<oopDesc*>(this); }
 128 
 129  public:
 130   // field addresses in oop
 131   inline void* field_addr(int offset)     const;
 132   inline void* field_addr_raw(int offset) const;
 133 
 134   // Need this as public for garbage collection.
 135   template <class T> inline T* obj_field_addr_raw(int offset) const;
 136 
 137   template <typename T> inline size_t field_offset(T* p) const;
 138 
 139   // Standard compare function returns negative value if o1 < o2
 140   //                                   0              if o1 == o2
 141   //                                   positive value if o1 > o2
 142   inline static int  compare(oop o1, oop o2) {
 143     void* o1_addr = (void*)o1;
 144     void* o2_addr = (void*)o2;




  99   inline oop list_ptr_from_klass();
 100 
 101   // size of object header, aligned to platform wordSize
 102   static int header_size() { return sizeof(oopDesc)/HeapWordSize; }
 103 
 104   // Returns whether this is an instance of k or an instance of a subclass of k
 105   inline bool is_a(Klass* k) const;
 106 
 107   // Returns the actual oop size of the object
 108   inline int size();
 109 
 110   // Sometimes (for complicated concurrency-related reasons), it is useful
 111   // to be able to figure out the size of an object knowing its klass.
 112   inline int size_given_klass(Klass* klass);
 113 
 114   // type test operations (inlined in oop.inline.hpp)
 115   inline bool is_instance()            const;
 116   inline bool is_array()               const;
 117   inline bool is_objArray()            const;
 118   inline bool is_typeArray()           const;
 119   inline bool is_value()               const;
 120   inline bool is_valueArray()          const;
 121 
 122   // type test operations that don't require inclusion of oop.inline.hpp.
 123   bool is_instance_noinline()          const;
 124   bool is_array_noinline()             const;
 125   bool is_objArray_noinline()          const;
 126   bool is_typeArray_noinline()         const;
 127   bool is_value_noinline()             const;
 128   bool is_valueArray_noinline()        const;
 129 
 130  protected:
 131   inline oop        as_oop() const { return const_cast<oopDesc*>(this); }
 132 
 133  public:
 134   // field addresses in oop
 135   inline void* field_addr(int offset)     const;
 136   inline void* field_addr_raw(int offset) const;
 137 
 138   // Need this as public for garbage collection.
 139   template <class T> inline T* obj_field_addr_raw(int offset) const;
 140 
 141   template <typename T> inline size_t field_offset(T* p) const;
 142 
 143   // Standard compare function returns negative value if o1 < o2
 144   //                                   0              if o1 == o2
 145   //                                   positive value if o1 > o2
 146   inline static int  compare(oop o1, oop o2) {
 147     void* o1_addr = (void*)o1;
 148     void* o2_addr = (void*)o2;


< prev index next >