< prev index next >

src/share/vm/oops/objArrayOop.hpp

Print this page
rev 9846 : 8146401: Clean up oop.hpp: add inline directives and fix header files
Reviewed-by: coleenp
rev 9847 : 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
Summary: Fix remaining issues after 8146401


  64     } else {
  65       old_res = align_size_up((uint)length, OopsPerHeapWord)/OopsPerHeapWord;
  66     }
  67     assert(res == old_res, "Inconsistency between old and new.");
  68 #endif  // ASSERT
  69     return res;
  70   }
  71 
  72  public:
  73   // Returns the offset of the first element.
  74   static int base_offset_in_bytes() {
  75     return arrayOopDesc::base_offset_in_bytes(T_OBJECT);
  76   }
  77 
  78   // base is the address following the header.
  79   HeapWord* base() const      { return (HeapWord*) arrayOopDesc::base(T_OBJECT); }
  80 
  81   // Accessing
  82   oop obj_at(int index) const;
  83 
  84   void /*inline*/ obj_at_put(int index, oop value);
  85 
  86   oop atomic_compare_exchange_oop(int index, oop exchange_value, oop compare_value);
  87 
  88   // Sizing
  89   static int header_size()    { return arrayOopDesc::header_size(T_OBJECT); }
  90   int object_size()           { return object_size(length()); }
  91 
  92   static int object_size(int length) {
  93     // This returns the object size in HeapWords.
  94     uint asz = array_size(length);
  95     uint osz = align_object_size(header_size() + asz);
  96     assert(osz >= asz,   "no overflow");
  97     assert((int)osz > 0, "no overflow");
  98     return (int)osz;
  99   }
 100 
 101   // special iterators for index ranges, returns size of object
 102 #define ObjArrayOop_OOP_ITERATE_DECL(OopClosureType, nv_suffix)     \
 103   void oop_iterate_range(OopClosureType* blk, int start, int end);
 104 


  64     } else {
  65       old_res = align_size_up((uint)length, OopsPerHeapWord)/OopsPerHeapWord;
  66     }
  67     assert(res == old_res, "Inconsistency between old and new.");
  68 #endif  // ASSERT
  69     return res;
  70   }
  71 
  72  public:
  73   // Returns the offset of the first element.
  74   static int base_offset_in_bytes() {
  75     return arrayOopDesc::base_offset_in_bytes(T_OBJECT);
  76   }
  77 
  78   // base is the address following the header.
  79   HeapWord* base() const      { return (HeapWord*) arrayOopDesc::base(T_OBJECT); }
  80 
  81   // Accessing
  82   oop obj_at(int index) const;
  83 
  84   void inline obj_at_put(int index, oop value);
  85 
  86   oop atomic_compare_exchange_oop(int index, oop exchange_value, oop compare_value);
  87 
  88   // Sizing
  89   static int header_size()    { return arrayOopDesc::header_size(T_OBJECT); }
  90   int object_size()           { return object_size(length()); }
  91 
  92   static int object_size(int length) {
  93     // This returns the object size in HeapWords.
  94     uint asz = array_size(length);
  95     uint osz = align_object_size(header_size() + asz);
  96     assert(osz >= asz,   "no overflow");
  97     assert((int)osz > 0, "no overflow");
  98     return (int)osz;
  99   }
 100 
 101   // special iterators for index ranges, returns size of object
 102 #define ObjArrayOop_OOP_ITERATE_DECL(OopClosureType, nv_suffix)     \
 103   void oop_iterate_range(OopClosureType* blk, int start, int end);
 104 
< prev index next >