RFR: 8367656: Refactor Constantpool's operand array into two [v12]
Coleen Phillimore
coleenp at openjdk.org
Wed Nov 5 12:50:30 UTC 2025
On Wed, 8 Oct 2025 21:09:23 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix copyright
>
> src/hotspot/share/oops/bsmAttribute.inline.hpp line 34:
>
>> 32: _cur_array + BSMAttributeEntry::u2s_required(argc) > insert_into->bootstrap_methods()->length()) {
>> 33: return nullptr;
>> 34: }
>
> Nit: This check needs a comment. Also, I'd suggest to add a guarantee here instead of returning `nullptr`.
I agree with this comment - is returning null going to crash somewhere down the line? Is this an overflow?
> src/hotspot/share/oops/constantPool.hpp line 94:
>
>> 92: InstanceKlass* _pool_holder; // the corresponding class
>> 93:
>> 94: BSMAttributeEntries _bsmaentries;
>
> Nit: Suggestion to rename: `_bsmaentries` => `_bsm_entries`.
This is a good suggestion for a minor change.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27198#discussion_r2494322202
PR Review Comment: https://git.openjdk.org/jdk/pull/27198#discussion_r2494323677
More information about the hotspot-dev
mailing list