RFR: 8293207: Add assert to JVM_ReferenceRefersTo to clarify its API [v2]

Axel Boldt-Christmas aboldtch at openjdk.org
Fri Sep 2 07:32:10 UTC 2022


> 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

Axel Boldt-Christmas has updated the pull request incrementally with one additional commit since the last revision:

  Add comment reference to JVM_PhantomReferenceRefersTo

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/10117/files
  - new: https://git.openjdk.org/jdk/pull/10117/files/ff334b45..2325742a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=10117&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10117&range=00-01

  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/10117.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10117/head:pull/10117

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


More information about the hotspot-dev mailing list