< prev index next >

src/hotspot/share/oops/objArrayKlass.inline.hpp

Print this page

 53   T* const l = (T*)low;
 54   T* const h = (T*)high;
 55 
 56   T* p   = (T*)a->base();
 57   T* end = p + a->length();
 58 
 59   if (p < l) {
 60     p = l;
 61   }
 62   if (end > h) {
 63     end = h;
 64   }
 65 
 66   for (;p < end; ++p) {
 67     Devirtualizer::do_oop(closure, p);
 68   }
 69 }
 70 
 71 template <typename T, typename OopClosureType>
 72 void ObjArrayKlass::oop_oop_iterate(oop obj, OopClosureType* closure) {
 73   assert (obj->is_array(), "obj must be array");
 74   objArrayOop a = objArrayOop(obj);
 75 
 76   if (Devirtualizer::do_metadata(closure)) {
 77     Devirtualizer::do_klass(closure, obj->klass());
 78   }
 79 
 80   oop_oop_iterate_elements<T>(a, closure);
 81 }
 82 
 83 template <typename T, typename OopClosureType>
 84 void ObjArrayKlass::oop_oop_iterate_reverse(oop obj, OopClosureType* closure) {
 85   // No reverse implementation ATM.
 86   oop_oop_iterate<T>(obj, closure);
 87 }
 88 
 89 template <typename T, typename OopClosureType>
 90 void ObjArrayKlass::oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr) {
 91   assert(obj->is_array(), "obj must be array");
 92   objArrayOop a  = objArrayOop(obj);
 93 

 53   T* const l = (T*)low;
 54   T* const h = (T*)high;
 55 
 56   T* p   = (T*)a->base();
 57   T* end = p + a->length();
 58 
 59   if (p < l) {
 60     p = l;
 61   }
 62   if (end > h) {
 63     end = h;
 64   }
 65 
 66   for (;p < end; ++p) {
 67     Devirtualizer::do_oop(closure, p);
 68   }
 69 }
 70 
 71 template <typename T, typename OopClosureType>
 72 void ObjArrayKlass::oop_oop_iterate(oop obj, OopClosureType* closure) {
 73   assert (UseCompactObjectHeaders || obj->is_array(), "obj must be array");
 74   objArrayOop a = objArrayOop(obj);
 75 
 76   if (Devirtualizer::do_metadata(closure)) {
 77     Devirtualizer::do_klass(closure, obj->klass());
 78   }
 79 
 80   oop_oop_iterate_elements<T>(a, closure);
 81 }
 82 
 83 template <typename T, typename OopClosureType>
 84 void ObjArrayKlass::oop_oop_iterate_reverse(oop obj, OopClosureType* closure) {
 85   // No reverse implementation ATM.
 86   oop_oop_iterate<T>(obj, closure);
 87 }
 88 
 89 template <typename T, typename OopClosureType>
 90 void ObjArrayKlass::oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr) {
 91   assert(obj->is_array(), "obj must be array");
 92   objArrayOop a  = objArrayOop(obj);
 93 
< prev index next >