mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8237637: Remove dubious type conversions from oop
Reviewed-by: kbarrett, dholmes, mdoerr
This commit is contained in:
parent
b223907794
commit
46423b0f70
83 changed files with 163 additions and 215 deletions
|
@ -1004,7 +1004,7 @@ void GenCollectedHeap::do_full_collection(bool clear_all_soft_refs,
|
|||
}
|
||||
|
||||
bool GenCollectedHeap::is_in_young(oop p) {
|
||||
bool result = ((HeapWord*)p) < _old_gen->reserved().start();
|
||||
bool result = cast_from_oop<HeapWord*>(p) < _old_gen->reserved().start();
|
||||
assert(result == _young_gen->is_in_reserved(p),
|
||||
"incorrect test - result=%d, p=" INTPTR_FORMAT, result, p2i((void*)p));
|
||||
return result;
|
||||
|
@ -1365,7 +1365,7 @@ oop GenCollectedHeap::handle_failed_promotion(Generation* old_gen,
|
|||
result = old_gen->expand_and_allocate(obj_size, false);
|
||||
|
||||
if (result != NULL) {
|
||||
Copy::aligned_disjoint_words((HeapWord*)obj, result, obj_size);
|
||||
Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(obj), result, obj_size);
|
||||
}
|
||||
return oop(result);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue