On Fri, 5 Jun 2026 19:33:12 GMT, Patricio Chilano Mateo
<[email protected]> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Move some asserts around.
>
> src/hotspot/share/runtime/sharedRuntime.cpp line 2904:
>
>> 2902: assert(JavaThread::current()->thread_state() != _thread_in_native,
>> "must not be in native");
>> 2903: bool has_scalarized = false;
>> 2904: if (_method != nullptr) {
>
> Given that the non-link case relies on the method being linked already to
> compute the signatures, should we assert that the adapter is available?
>
> `assert(link_time || _method->adapter() != nullptr, "invariant");`
Yes, this is a good improvement and helps with understanding that the code is
called for both link time to create the adapters and runtime to print
registers. Something like
assert(link_time || (_method != nullptr && _method->adapter() != nullptr),
"invariant");
> src/hotspot/share/runtime/sharedRuntime.cpp line 2951:
>
>> 2949: SigEntry::add_entry(_sig_cc_ro, T_OBJECT, ss.as_symbol());
>> 2950: }
>> 2951: bt = T_OBJECT;
>
> Preexistent: this can be removed since it’s one of the branch conditions.
Added const to make it clear that nothing is changing bt.
Retesting with these changes, thanks.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2517#discussion_r3365034050
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2517#discussion_r3365045807