< prev index next >

src/share/vm/oops/objArrayOop.hpp

Print this page
rev 12906 : [mq]: gc_interface

@@ -41,10 +41,15 @@
   template <class T> T* obj_at_addr(int index) const {
     assert(is_within_bounds(index), "index out of bounds");
     return &((T*)base())[index];
   }
 
+  template <class T>
+  static jlong obj_at_offset(int index) {
+    return base_offset_in_bytes() + sizeof(T) * index;
+  }
+
 private:
   // Give size of objArrayOop in HeapWords minus the header
   static int array_size(int length) {
     const uint OopsPerHeapWord = HeapWordSize/heapOopSize;
     assert(OopsPerHeapWord >= 1 && (HeapWordSize % heapOopSize == 0),

@@ -79,11 +84,11 @@
   HeapWord* base() const      { return (HeapWord*) arrayOopDesc::base(T_OBJECT); }
 
   // Accessing
   oop obj_at(int index) const;
 
-  void inline obj_at_put(int index, oop value);
+  void obj_at_put(int index, oop value);
 
   oop atomic_compare_exchange_oop(int index, oop exchange_value, oop compare_value);
 
   // Sizing
   static int header_size()    { return arrayOopDesc::header_size(T_OBJECT); }
< prev index next >