1.1 --- a/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp Fri Jul 10 16:01:20 2009 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp Tue Jul 14 15:40:39 2009 -0700 1.3 @@ -30,12 +30,8 @@ 1.4 } 1.5 } 1.6 1.7 -inline void HRInto_G1RemSet::write_ref_nv(HeapRegion* from, oop* p) { 1.8 - par_write_ref(from, p, 0); 1.9 -} 1.10 - 1.11 -inline void HRInto_G1RemSet::write_ref(HeapRegion* from, oop* p) { 1.12 - write_ref_nv(from, p); 1.13 +template <class T> inline void HRInto_G1RemSet::write_ref_nv(HeapRegion* from, T* p) { 1.14 + par_write_ref_nv(from, p, 0); 1.15 } 1.16 1.17 inline bool HRInto_G1RemSet::self_forwarded(oop obj) { 1.18 @@ -43,8 +39,8 @@ 1.19 return result; 1.20 } 1.21 1.22 -inline void HRInto_G1RemSet::par_write_ref(HeapRegion* from, oop* p, int tid) { 1.23 - oop obj = *p; 1.24 +template <class T> inline void HRInto_G1RemSet::par_write_ref_nv(HeapRegion* from, T* p, int tid) { 1.25 + oop obj = oopDesc::load_decode_heap_oop(p); 1.26 #ifdef ASSERT 1.27 // can't do because of races 1.28 // assert(obj == NULL || obj->is_oop(), "expected an oop"); 1.29 @@ -71,7 +67,7 @@ 1.30 // false during the evacuation failure handing. 1.31 if (_par_traversal_in_progress && 1.32 to->in_collection_set() && !self_forwarded(obj)) { 1.33 - _new_refs[tid]->push(p); 1.34 + _new_refs[tid]->push((void*)p); 1.35 // Deferred updates to the Cset are either discarded (in the normal case), 1.36 // or processed (if an evacuation failure occurs) at the end 1.37 // of the collection. 1.38 @@ -89,11 +85,7 @@ 1.39 } 1.40 } 1.41 1.42 -inline void UpdateRSOopClosure::do_oop(narrowOop* p) { 1.43 - guarantee(false, "NYI"); 1.44 -} 1.45 - 1.46 -inline void UpdateRSOopClosure::do_oop(oop* p) { 1.47 +template <class T> inline void UpdateRSOopClosure::do_oop_work(T* p) { 1.48 assert(_from != NULL, "from region must be non-NULL"); 1.49 _rs->par_write_ref(_from, p, _worker_i); 1.50 }