On Thu, 19 Jun 2025 08:03:20 GMT, Johan Sjölen <jsjo...@openjdk.org> wrote:

>> Hi,
>> 
>>  The constant pool currently has a lot of methods specific to extracting 
>> parts of the operands array. What this array actually is, is a sequence of 
>> bootstrap method attribute entries, where each entry has the following 
>> components:
>> 
>> ```c++
>> struct BSMAE {
>>   u2 bootstrap_method_index;
>>   u2 argument_count;
>>   u2 arguments[argument_count];
>> }
>> 
>> 
>> We can removes some of these operands array specific methods, and instead 
>> allows you to extract BSMAttributeEntrys which you can then use to extract 
>> its piece wise components. This makes for a nicer interface, and a bit 
>> easier to come into as a reader of the code, as it more closely mirrors the 
>> JVMS. 
>> 
>> Please consider!
>> 
>> Testing: Currently GHA, running tier1-tier3
>
> Johan Sjölen has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Fix

Marked as reviewed by sspitsyn (Reviewer).

src/hotspot/share/cds/aotConstantPoolResolver.cpp line 517:

> 515: 
> 516:     int bsms_attribute_index = 
> cp->bootstrap_methods_attribute_index(cp_index);
> 517:     int arg_count = 
> cp->bsm_attribute_entry(bsms_attribute_index)->argument_count();

Your fix made it possible to do a bit more simplifications.
For instance, each `bsms_attribute_index` parameter can be replaced with a 
`bsme` parameter.
But this does not look that important at the moment.

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

PR Review: https://git.openjdk.org/jdk/pull/25298#pullrequestreview-2942179152
PR Review Comment: https://git.openjdk.org/jdk/pull/25298#discussion_r2156509715

Reply via email to