RFR: 8299973: Replace NULL with nullptr in share/utilities/ [v4]

Kim Barrett kbarrett at openjdk.org
Thu Jan 19 11:29:37 UTC 2023


On Thu, 19 Jan 2023 09:15:03 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Johan Sjölen has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Remove redundant assert
>>  - Use "null" as generic term in logs and comments
>
> src/hotspot/share/utilities/globalDefinitions_xlc.hpp line 78:
> 
>> 76: // Some platform/tool-chain combinations can't assign NULL to an integer
>> 77: // type so we define NULL_WORD to use in those contexts. For xlc they are the same.
>> 78: #define NULL_WORD  nullptr
> 
> Hmmm so maybe NULL_WORD can be retired after this change?

NULL_WORD is mostly used in the x86 assembler, for overloading purposes.  I've made a couple of attempts
at improving it but it was messy because of NULL and the lack of a known type for it (though decltype could
be used for that now).  It might be easier with NULL => nullptr everywhere.

There are a small number of uses of NULL_WORD elsewhere, most/all of which I think are mistakes.

And I agree this ought not be changed at this time.

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

PR: https://git.openjdk.org/jdk/pull/12015


More information about the hotspot-dev mailing list