8247912: Make narrowOop a scoped enum

Reviewed-by: iklam, stefank
This commit is contained in:
Kim Barrett 2020-10-01 10:45:22 +00:00
parent 928da494a8
commit 2d9fa9da02
22 changed files with 88 additions and 55 deletions

View file

@ -67,7 +67,7 @@ const double CLEAN_DEAD_HIGH_WATER_MARK = 0.5;
#if INCLUDE_CDS_JAVA_HEAP
inline oop read_string_from_compact_hashtable(address base_address, u4 offset) {
assert(sizeof(narrowOop) == sizeof(offset), "must be");
narrowOop v = (narrowOop)offset;
narrowOop v = CompressedOops::narrow_oop_cast(offset);
return HeapShared::decode_from_archive(v);
}
@ -750,7 +750,7 @@ public:
}
// add to the compact table
_writer->add(hash, CompressedOops::encode(new_s));
_writer->add(hash, CompressedOops::narrow_oop_value(new_s));
return true;
}
};