On Fri, 1 Aug 2025 21:05:53 GMT, David Holmes <dhol...@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).
>
> src/hotspot/share/classfile/javaClasses.cpp line 3060:
> 
>> 3058: }
>> 3059: 
>> 3060: bool java_lang_Throwable::get_method_and_bci(oop throwable, Method** 
>> method, int* bci, int depth, bool hidden_ok) {
> 
> Suggestion:
> 
> bool java_lang_Throwable::get_method_and_bci(oop throwable, Method** method, 
> int* bci, int depth, bool allow_hidden) {

Done.

> src/hotspot/share/interpreter/bytecodeUtils.hpp line 40:
> 
>> 38:   static bool get_NPE_message_at(outputStream* ss, Method* method, int 
>> bci);
>> 39:   // NPE extended message. Return true if string is printed.
>> 40:   static bool get_NPE_message_at(outputStream* ss, Method* method, int 
>> bci, int slot);
> 
> Can you combine these with a default slot parameter (-1?) ? I'm suspecting 
> not even though it might appear that once you have the slot you could call 
> the new method, but the new method seems to expect only particular "kinds" of 
> slot i.e. non-bytecode. But this is not documented at all. Please add 
> comments to make it clear what the `slot` parameter is expected to be and how 
> these two methods differ.

Done, and documented.

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

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

Reply via email to