Integrated: 8293207: Add assert to JVM_ReferenceRefersTo to clarify its API

Axel Boldt-Christmas aboldtch at openjdk.org
Fri Sep 2 13:03: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

This pull request has now been integrated.

Changeset: 6fc58b83
Author:    Axel Boldt-Christmas <aboldtch at openjdk.org>
Committer: Stefan Karlsson <stefank at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/6fc58b8324d5b2d36e8c62839eda50a16c9da7bd
Stats:     3 lines in 1 file changed: 3 ins; 0 del; 0 mod

8293207: Add assert to JVM_ReferenceRefersTo to clarify its API

Reviewed-by: stefank, kbarrett

-------------

PR: https://git.openjdk.org/jdk/pull/10117


More information about the hotspot-dev mailing list