RFR: 8285364: Use more precise name for ReferenceType::REF_OTHER [v2]

Kim Barrett kbarrett at openjdk.java.net
Fri Apr 22 09:08:25 UTC 2022


On Thu, 21 Apr 2022 11:30:20 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Simple rename and some comments update.
>> 
>> Test: build
>
> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review

> > Using REF_SOFT seems too hacky.
> 
> Just to put all alternatives on the table. The use of `REF_SOFT` is ephemeral.
> 
> [...]
> I have no particular preference. What does everyone think?

I also think using REF_SOFT like that is overly hacky.

I think there is still a bootstrapping weirdness, whether using REF_REFERENCE
or using Stefan's approach. I think Soft/Weak/Final/PhantomReference_klass get
constructed with the reftype of Reference_klass (whatever that is), and then
have it later updated to the correct value. In that respect REF_OTHER seems
better than REF_REFERENCE. So I no longer like the renaming. Getting rid of it
entirely with Stefan's approach, they get REF_NONE initially and then set to
the proper value; that's far from the worst bootstrapping kludge I've ever seen.

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

PR: https://git.openjdk.java.net/jdk/pull/8332


More information about the serviceability-dev mailing list