RFR: 8308092: Replace NULL with nullptr in gc/x
Stefan Karlsson
stefank at openjdk.org
Tue May 16 09:37:45 UTC 2023
On Tue, 16 May 2023 07:36:13 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Replace NULL with nullptr in gc/x. We've already done this work for Generational ZGC, but left it for the Singlegen ZGC code.
>
> src/hotspot/share/gc/x/xBarrier.inline.hpp line 229:
>
>> 227: //
>> 228: inline oop XBarrier::load_barrier_on_oop(oop o) {
>> 229: return load_barrier_on_oop_field_preloaded((oop*)nullptr, o);
>
> Casts should not be needed on `nullptr`.
They are needed to disambiguate the two overloaded functions that take `volatile oop*` and `volatile narrowOop*` respectively.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13984#discussion_r1194891740
More information about the hotspot-dev
mailing list