RFR: 8293207: Add assert to JVM_ReferenceRefersTo to clarify its API
Kim Barrett
kbarrett at openjdk.org
Fri Sep 2 00:16:47 UTC 2022
On Thu, 1 Sep 2022 10:47:50 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
> JVM_ReferenceRefersTo should only be used for soft/weak references and not phantom references, which has its own implementation. This is not clear from the name. `java_lang_ref_Reference::weak_referent_no_keepalive(ref_oop)` is only a valid call if `!java_lang_ref_Reference::is_phantom(ref_oop)`.
>
> Adds an assert and comment to make this clear.
>
> Testing: Oracle platforms tier 1-3
Looks good.
-------------
Marked as reviewed by kbarrett (Reviewer).
PR: https://git.openjdk.org/jdk/pull/10117
More information about the hotspot-dev
mailing list