RFR: 8307312: Replace "int which" with "int cp_index" in constantPool [v2]
Coleen Phillimore
coleenp at openjdk.org
Mon Jul 31 16:17:51 UTC 2023
On Mon, 31 Jul 2023 16:04:23 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> Many accessors in the constant pool take an argument "int which" that is meant to represent an ambiguous index. Despite this, several methods in the API use "int which" when the argument is exclusively a constant pool index. This patch aims to rename all of these instances to "int cp_index" in order to be more clear and to distinguish methods that take constant pool indices and methods that use derived indices.
>>
>> The callers have been updated to use more clear naming as well. Verified with tier 1-5 tests.
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
>
> David comments
I hate to be disagreeable but the change to cp_index in resolve_constant_at_impl was good because cache_index is also a parameter in that function. Knowing which index is very helpful there. Can you change back just that one?
-------------
PR Review: https://git.openjdk.org/jdk/pull/15027#pullrequestreview-1555249099
More information about the hotspot-dev
mailing list