On Wed, 11 Feb 2026 21:41:44 GMT, Dan Heidinga <[email protected]> wrote:

>> Roland Westrelin has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   review
>
> src/hotspot/share/opto/escape.cpp line 2150:
> 
>> 2148:       }
>> 2149:       _i_sig_cc++;
>> 2150:     }
> 
> Is it worth tracking the previous BasicType from the signature rather than 
> reaching back with the `_i_sig_cc-1`?  
> 
> Something like:
> Suggestion:
> 
>    BasicType prev_bt = T_VOID;
>     while (_i_sig_cc < _sig_cc->length()) {
>       BasicType bt = _sig_cc->at(_i_sig_cc)._bt;
>       if (bt == T_METADATA) {
>         _depth++;
>       } else if (bt == T_VOID && (prev_bt != T_LONG && prev_bt != T_DOUBLE)) {
>         _depth--;
>         if (_depth == 0) {
>           _i_domain++;
>         }
>       } else {
>         return;
>       }
>       prev_bt = bt;
>       _i_sig_cc++;
>     }

I pushed a new commit that does that.
When  `_sig_cc->at(_i_sig_cc)._bt = T_LONG`, the method exits. So next time 
it's called, with the suggested code above, `prev_bt` is not set to `T_LONG`, 
the way it should. The `prev_bt` initialization is slightly more complicated as 
a result.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2079#discussion_r2797771541

Reply via email to