< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp
Print this page
@@ -281,11 +281,11 @@
return ShenandoahBarrierSet::resolve_forwarded(p);
}
// Copy the object:
- Copy::aligned_disjoint_words((HeapWord*) p, copy, size);
+ Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(p), copy, size);
// Try to install the new forwarding pointer.
oop copy_val = oop(copy);
oop result = ShenandoahForwarding::try_update_forwardee(p, copy_val);
if (result == copy_val) {
@@ -324,11 +324,11 @@
return !_marking_context->is_marked(obj);
}
template <class T>
inline bool ShenandoahHeap::in_collection_set(T p) const {
- HeapWord* obj = (HeapWord*) p;
+ HeapWord* obj = cast_from_oop<HeapWord*>(p);
assert(collection_set() != NULL, "Sanity");
assert(is_in(obj), "should be in heap");
return collection_set()->is_in(obj);
}
< prev index next >