RFR (S) 8196199: Remove miscellaneous oop comparison operators
coleen.phillimore at oracle.com
coleen.phillimore at oracle.com
Wed Jan 31 21:05:56 UTC 2018
On 1/31/18 4:01 PM, Kim Barrett wrote:
>> On Jan 31, 2018, at 2:30 PM, harold seigel <harold.seigel at oracle.com> wrote:
>>
>> Hi Coleen,
>>
>> This change looks good.
>>
>> In jniCheck.cpp, you could use the is_null(oop obj) function defined in oop.hpp instead of 'oop == NULL’.
> I like this suggestion, and wish I’d thought of it while writing the initial code. I think it should be applied to all of the former uses of operator!. Coleen?
There are a zillion places where oop is compared with NULL. Or this
pattern:
Handle h(THREAD, someoop);
if (h() != NULL)
as well as
if (h.is_not_null())
and
if (!h.is_null()) which is my favorite thing because I can never
remember offhand if the above is Handle::is_non_null() or
Handle::is_not_null().
I don't think I would like to make this change.
The oopDesc::is_null() function exists because it needs the overload for
oop vs. narrowOop in the template instantiations of decode_heap_oop. I
think it's messy to use otherwise, and not needed for the new GCs.
thanks,
Coleen
>
>> Harold
>>
>>
>> On 1/30/2018 5:58 PM, coleen.phillimore at oracle.com wrote:
>>> CheckUnhandledOops had defined some oop comparison operators that will have to be rewritten for new GCs. Kim Barrett did most of this change. See CR for more info.
>>>
>>> Tested with JPRT (using currently supported GCs) tier1 and locally.
>>>
>>> open webrev at http://cr.openjdk.java.net/~coleenp/8196199.01/webrev
>>> bug link https://bugs.openjdk.java.net/browse/JDK-8196199
>>>
>>> Thanks,
>>> Coleen
>
More information about the hotspot-dev
mailing list