27 |
27 |
28 class objArrayOopDesc : public arrayOopDesc { |
28 class objArrayOopDesc : public arrayOopDesc { |
29 friend class objArrayKlass; |
29 friend class objArrayKlass; |
30 friend class Runtime1; |
30 friend class Runtime1; |
31 friend class psPromotionManager; |
31 friend class psPromotionManager; |
|
32 friend class CSMarkOopClosure; |
|
33 friend class G1ParScanPartialArrayClosure; |
32 |
34 |
33 template <class T> T* obj_at_addr(int index) const { |
35 template <class T> T* obj_at_addr(int index) const { |
34 assert(is_within_bounds(index), "index out of bounds"); |
36 assert(is_within_bounds(index), "index out of bounds"); |
35 return &((T*)base())[index]; |
37 return &((T*)base())[index]; |
36 } |
38 } |
86 // special iterators for index ranges, returns size of object |
88 // special iterators for index ranges, returns size of object |
87 #define ObjArrayOop_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \ |
89 #define ObjArrayOop_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \ |
88 int oop_iterate_range(OopClosureType* blk, int start, int end); |
90 int oop_iterate_range(OopClosureType* blk, int start, int end); |
89 |
91 |
90 ALL_OOP_OOP_ITERATE_CLOSURES_1(ObjArrayOop_OOP_ITERATE_DECL) |
92 ALL_OOP_OOP_ITERATE_CLOSURES_1(ObjArrayOop_OOP_ITERATE_DECL) |
91 ALL_OOP_OOP_ITERATE_CLOSURES_3(ObjArrayOop_OOP_ITERATE_DECL) |
93 ALL_OOP_OOP_ITERATE_CLOSURES_2(ObjArrayOop_OOP_ITERATE_DECL) |
92 }; |
94 }; |