[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: JDK-8301070: Replace NULL with nullptr in share/memory/ [v2]
From:       Johan =?UTF-8?B?U2rDtmxlbg==?= <jsjolen () openjdk ! org>
Date:       2023-01-26 15:08:42
Message-ID: iZbzyjGFbiYfstphZFifX4RWQRDNTDKgbzqg6n7FKJo=.17526e7c-de71-4aab-a8b8-f6aae5eed020 () github ! com
[Download RAW message or body]

On Thu, 26 Jan 2023 15:04:06 GMT, Johan Sjölen <jsjolen@openjdk.org> wrote:

> > src/hotspot/share/memory/metaspace/blockTree.hpp line 228:
> > 
> > > 226:       DEBUG_ONLY(check_node(insertion_point);)
> > > 227:       if (n->_word_size == insertion_point->_word_size) {
> > > 228:         add_to_list(n, insertion_point); // parent stays null in this \
> > > case.
> > 
> > Small nit. Do we have a unified naming scheme for comments?
> > 
> > "null" reads like a java null. I prefer keeping NULL in comments.
> 
> > Small nit. Do we have a unified naming scheme for comments?
> 
> Yeah, I forgot to update the PR message with all of the info. If you check now you \
> can see what's been decided upon. The discussions can be found in previous PRs, I \
> can link to them if you're curious. 
> > "null" reads like a java null. I prefer keeping NULL in comments.
> 
> That's true, but this probably can be inferred from context which one is meant \
> quite easily? I'd be more keen on explicitly saying that something is a Java null.

FWIW, from fixing these reviews I've never seen us referring to a Java null when we \
meant a C++ nullptr.

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic