8237637: Remove dubious type conversions from oop

Reviewed-by: kbarrett, dholmes, mdoerr
This commit is contained in:
Stefan Karlsson 2020-01-24 09:27:07 +01:00
parent b223907794
commit 46423b0f70
83 changed files with 163 additions and 215 deletions

View file

@ -445,9 +445,9 @@ class VerifyObjectStartArrayClosure : public ObjectClosure {
_old_gen(old_gen), _start_array(start_array) { }
virtual void do_object(oop obj) {
HeapWord* test_addr = (HeapWord*)obj + 1;
guarantee(_start_array->object_start(test_addr) == (HeapWord*)obj, "ObjectStartArray cannot find start of object");
guarantee(_start_array->is_block_allocated((HeapWord*)obj), "ObjectStartArray missing block allocation");
HeapWord* test_addr = cast_from_oop<HeapWord*>(obj) + 1;
guarantee(_start_array->object_start(test_addr) == cast_from_oop<HeapWord*>(obj), "ObjectStartArray cannot find start of object");
guarantee(_start_array->is_block_allocated(cast_from_oop<HeapWord*>(obj)), "ObjectStartArray missing block allocation");
}
};