On Fri, 1 Aug 2025 15:49:57 GMT, Chen Liang <li...@openjdk.org> wrote:

> Provide a general facility for our null check APIs like 
> Objects::requireNonNull or future Checks::nullCheck (void), converting the 
> existing infrastructure to start tracking from a given stack site (depth 
> offset) and a given stack slot (offset value).

Still reading this. A few comments, mostly intended to make this easier to grok 
for future readers. The actual logic seems fine from a first read.

src/java.base/share/classes/java/lang/NullPointerException.java line 159:

> 157:     ///    configurations to trace how a particular argument, which 
> turns out to
> 158:     ///    be `null`, was evaluated.
> 159:     /// 2. `searchSlot < 0`, stack offset is 0 (a call to the nullary 
> constructor)

Can `searchSlot == -1` here?

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

PR Review: https://git.openjdk.org/jdk/pull/26600#pullrequestreview-3087588630
PR Review Comment: https://git.openjdk.org/jdk/pull/26600#discussion_r2253882841

Reply via email to