On Tue, 5 Aug 2025 16:04:08 GMT, Chen Liang <[email protected]> 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).
>> 
>> This is a necessary prerequisite for 
>> https://bugs.openjdk.org/browse/JDK-8233268, which proposes enhanced null 
>> messages to `Objects::requireNonNull`.
>
> Chen Liang has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Update NPE per roger review

src/hotspot/share/interpreter/bytecodeUtils.cpp line 205:

> 203:     // A slot is found
> 204:     FOUND
> 205:   };

So you define an ENUM to capture the negative cases but then you can use any 
int >= 0 and pretend it is a member of the enum. ?? Is that typical C++ enum 
usage?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26600#discussion_r2373618080

Reply via email to