RFR: 8352565: Add native method implementation of Reference.get() [v4]

Aleksey Shipilev shade at openjdk.org
Fri Apr 11 08:54:30 UTC 2025


On Fri, 11 Apr 2025 08:03:07 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> You need to use intrinsic predicates to add runtime check for receiver. See:
>> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/library_call.cpp#L167
>
> I think it would be "easier" to shift `@IntrinsicCandidate` to a private `Reference.getImpl/get0` pair of methods, and intrinsify one of those instead. Pretty much like current `clear` and `refersTo` are doing it now. And it would be in line with what Kim is doing in this PR anyway.

On a second thought, I think we should do this shift before this PR, so that it is cleanly backportable. This bug messes with concurrent GC invariants, so it would be nice to fix it in current LTSes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24315#discussion_r2039108578


More information about the hotspot-dev mailing list