53
53
class DirtyCardToOopClosure : public MemRegionClosure {
54
54
protected:
55
55
OopIterateClosure* _cl;
56
- Space * _sp;
56
+ TenuredSpace * _sp;
57
57
HeapWord* _min_done; // Need a downwards traversal to compensate
58
58
// imprecise write barrier; this is the
59
59
// lowest location already done (or,
@@ -88,7 +88,7 @@ class DirtyCardToOopClosure: public MemRegionClosure {
88
88
HeapWord* bottom, HeapWord* top,
89
89
OopIterateClosure* cl);
90
90
public:
91
- DirtyCardToOopClosure (Space * sp, OopIterateClosure* cl) :
91
+ DirtyCardToOopClosure (TenuredSpace * sp, OopIterateClosure* cl) :
92
92
_cl (cl), _sp(sp), _min_done(nullptr ) {
93
93
NOT_PRODUCT (_last_bottom = nullptr );
94
94
}
@@ -98,7 +98,7 @@ class DirtyCardToOopClosure: public MemRegionClosure {
98
98
99
99
HeapWord* DirtyCardToOopClosure::get_actual_top (HeapWord* top,
100
100
HeapWord* top_obj) {
101
- if (top_obj != nullptr && top_obj < ( _sp-> toContiguousSpace ()) ->top ()) {
101
+ if (top_obj != nullptr && top_obj < _sp->top ()) {
102
102
if (cast_to_oop (top_obj)->is_objArray () || cast_to_oop (top_obj)->is_typeArray ()) {
103
103
// An arrayOop is starting on the dirty card - since we do exact
104
104
// store checks for objArrays we are done.
@@ -111,7 +111,7 @@ HeapWord* DirtyCardToOopClosure::get_actual_top(HeapWord* top,
111
111
top = top_obj + cast_to_oop (top_obj)->size ();
112
112
}
113
113
} else {
114
- top = ( _sp-> toContiguousSpace ()) ->top ();
114
+ top = _sp->top ();
115
115
}
116
116
return top;
117
117
}
0 commit comments