RFR: 8307306: Change some ConstantPool::name_ref_at calls to uncached_name_ref_at

Coleen Phillimore coleenp at openjdk.org
Thu May 4 16:30:18 UTC 2023


On Wed, 3 May 2023 19:18:18 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

> The set of functions in constantpool.hpp used for grabbing references at a certain index have cached and uncached variants which have different meanings for the index they take as an argument. In the implementation of these functions, the `uncached` boolean is checks alongside whether or not the cache has been created, but this is redundant since, if the cache has been created, the bytecode operands have been rewritten. This change replaces some of the calls with the uncached variant which expects a constant pool index as input so that the "cached" calls can take in rewritten indices. Verified with tier1-5 tests.

This is a good cleanup!

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

Marked as reviewed by coleenp (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13786#pullrequestreview-1413472021


More information about the hotspot-dev mailing list