RFR: 8309044: Replace NULL with nullptr, final sweep of hotspot code

David Holmes dholmes at openjdk.org
Tue May 30 01:01:13 UTC 2023


On Mon, 29 May 2023 10:09:15 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

> A final sweep of Hotspot to remove all re-added NULLs. With only 110 changes I'd appreciate if this was considered trivial.

Looks good. A few suggested changes below.

Can we now poison NULL so it can't get reintroduced? Or would that potentially break standard headers?

Thanks

src/hotspot/cpu/ppc/templateTable_ppc_64.cpp line 2297:

> 2295:   __ ld_ptr(method, array_base_offset + in_bytes(ResolvedIndyEntry::method_offset()), cache);
> 2296: 
> 2297:   // The invokedynamic is unresolved iff method is nullptr

Suggest: null

src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp line 489:

> 487:   __ load_klass(obj, obj, tmp1);  // get klass
> 488:   __ testptr(obj, obj);
> 489:   __ jcc(Assembler::zero, error); // if klass is nullptr it is broken

suggest: null

src/hotspot/share/gc/z/zHeap.cpp line 383:

> 381: 
> 382:   if (addr == zaddress::null) {
> 383:     st->print_raw_cr("nullptr");

Suggest: null

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14198#pullrequestreview-1449932378
PR Review Comment: https://git.openjdk.org/jdk/pull/14198#discussion_r1209610406
PR Review Comment: https://git.openjdk.org/jdk/pull/14198#discussion_r1209610541
PR Review Comment: https://git.openjdk.org/jdk/pull/14198#discussion_r1209610909


More information about the serviceability-dev mailing list