5353class DirtyCardToOopClosure : public MemRegionClosure {
5454protected:
5555 OopIterateClosure* _cl;
56- Space * _sp;
56+ TenuredSpace * _sp;
5757 HeapWord* _min_done; // Need a downwards traversal to compensate
5858 // imprecise write barrier; this is the
5959 // lowest location already done (or,
@@ -88,7 +88,7 @@ class DirtyCardToOopClosure: public MemRegionClosure {
8888 HeapWord* bottom, HeapWord* top,
8989 OopIterateClosure* cl);
9090public:
91- DirtyCardToOopClosure (Space * sp, OopIterateClosure* cl) :
91+ DirtyCardToOopClosure (TenuredSpace * sp, OopIterateClosure* cl) :
9292 _cl (cl), _sp(sp), _min_done(nullptr ) {
9393 NOT_PRODUCT (_last_bottom = nullptr );
9494 }
@@ -98,7 +98,7 @@ class DirtyCardToOopClosure: public MemRegionClosure {
9898
9999HeapWord* DirtyCardToOopClosure::get_actual_top (HeapWord* top,
100100 HeapWord* top_obj) {
101- if (top_obj != nullptr && top_obj < ( _sp-> toContiguousSpace ()) ->top ()) {
101+ if (top_obj != nullptr && top_obj < _sp->top ()) {
102102 if (cast_to_oop (top_obj)->is_objArray () || cast_to_oop (top_obj)->is_typeArray ()) {
103103 // An arrayOop is starting on the dirty card - since we do exact
104104 // store checks for objArrays we are done.
@@ -111,7 +111,7 @@ HeapWord* DirtyCardToOopClosure::get_actual_top(HeapWord* top,
111111 top = top_obj + cast_to_oop (top_obj)->size ();
112112 }
113113 } else {
114- top = ( _sp-> toContiguousSpace ()) ->top ();
114+ top = _sp->top ();
115115 }
116116 return top;
117117}
0 commit comments