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

Coleen Phillimore coleenp at openjdk.org
Wed May 17 20:19:55 UTC 2023


On Wed, 17 May 2023 17:40:01 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
> 
>  - Fixed javadoc and test cleanup
>  - Merge branch 'master' into refactor_ref_at_8307190
>  - Fixed comments and copyright
>  - Changed compilerToVM methods
>  - Coleen comments
>  - 8307190: Refactor ref_at methods in Constant Pool

This looks really good but I have a suggestion if possible (and typo).

test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java line 115:

> 113:             break;
> 114:           default:
> 115:             throw new Error("Unexpected consant pool entry");

Typo: consant

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

Changes requested by coleenp (Reviewer).

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


More information about the hotspot-dev mailing list