template <typename T> void do_oop_work(T* p) {
   T heap_oop = oopDesc::load_heap_oop(p);
   if (!oopDesc::is_null(heap_oop)) {
     oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
     if (!_is_alive_closure->do_object_b(obj)) {
       _found_dead = true;
     }
   }
 }
Esempio n. 2
0
 bool should_visit(oop obj) {
   return _filter == NULL || _filter->do_object_b(obj);
 }
 // Applies and returns the result from the is_alive closure, or
 // returns true if no such closure was provided.
 bool is_alive(oop o) {
     if (_is_alive != NULL) {
         return _is_alive->do_object_b(o);
     }
     return true;
 }