mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +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
|
@ -124,7 +124,7 @@ class PSPromotionManager {
|
|||
}
|
||||
|
||||
oop* mask_chunked_array_oop(oop obj) {
|
||||
assert(!is_oop_masked((oop*) obj), "invariant");
|
||||
assert(!is_oop_masked(cast_from_oop<oop*>(obj)), "invariant");
|
||||
oop* ret = (oop*) (cast_from_oop<uintptr_t>(obj) | PS_CHUNKED_ARRAY_OOP_MASK);
|
||||
assert(is_oop_masked(ret), "invariant");
|
||||
return ret;
|
||||
|
@ -135,7 +135,7 @@ class PSPromotionManager {
|
|||
assert(!p.is_narrow(), "chunked array oops cannot be narrow");
|
||||
oop *chunk = (oop*)p; // cast p to oop (uses conversion operator)
|
||||
oop ret = oop((oop*)((uintptr_t)chunk & ~PS_CHUNKED_ARRAY_OOP_MASK));
|
||||
assert(!is_oop_masked((oop*) ret), "invariant");
|
||||
assert(!is_oop_masked(cast_from_oop<oop*>(ret)), "invariant");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue