RFR: 8307190: Refactor ref_at methods in Constant Pool [v3]

Coleen Phillimore coleenp at openjdk.org
Thu May 18 16:24:28 UTC 2023


On Thu, 18 May 2023 16:01:11 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> In anticipation of [JDK-8301996](https://bugs.openjdk.org/browse/JDK-8301996), some of the accessors in constantpool.cpp need to be updated. The CPCache rework introduces multiple new meanings to the index argument passed to these functions, so they need to be restructured in a way that facilitates different paths depending on the input. For this enhancement, the bytecode is propagated by the callers to determine how to handle the index. Thanks to this and JDK-8307306, `bool uncached` is no longer needed in these functions.
>> 
>> Tests have been altered to suit the changes to JVMCI. Verified with tier1-5 tests.
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Coleen, Ioi, and Andrey comments

Looks good.  This makes the lookup based on index in the bytecode stream explicit and less confusing about which index this code refers to.

test/hotspot/jtreg/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java line 104:

> 102:      * Select an arbitrary bytecode of the type associated with the Constant pool entry type
> 103:      *
> 104:      * @param cpType Constant type from the Constant pool cache

Take out 'cache'.

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

Marked as reviewed by coleenp (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13872#pullrequestreview-1433012987
PR Review Comment: https://git.openjdk.org/jdk/pull/13872#discussion_r1198014058


More information about the hotspot-dev mailing list