8212184: Incorrect oop ref strength used for referents in FinalReference

Reviewed-by: eosterlund, kbarrett
This commit is contained in:
Per Lidén 2018-11-02 07:58:22 +01:00
parent ca91f514d8
commit 54d4acf73f
3 changed files with 13 additions and 1 deletions

View file

@ -127,6 +127,9 @@ void java_lang_ref_Reference::set_discovered_raw(oop ref, oop value) {
HeapWord* java_lang_ref_Reference::discovered_addr_raw(oop ref) {
return ref->obj_field_addr_raw<HeapWord>(discovered_offset);
}
bool java_lang_ref_Reference::is_final(oop ref) {
return InstanceKlass::cast(ref->klass())->reference_type() == REF_FINAL;
}
bool java_lang_ref_Reference::is_phantom(oop ref) {
return InstanceKlass::cast(ref->klass())->reference_type() == REF_PHANTOM;
}