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

Matias Saavedra Silva matsaave at openjdk.org
Wed May 3 20:47:23 UTC 2023


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.

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

Commit messages:
 - 8307306: Change some ConstantPool::name_ref_at calls to uncached_name_ref_at

Changes: https://git.openjdk.org/jdk/pull/13786/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13786&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8307306
  Stats: 27 lines in 5 files changed: 3 ins; 0 del; 24 mod
  Patch: https://git.openjdk.org/jdk/pull/13786.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13786/head:pull/13786

PR: https://git.openjdk.org/jdk/pull/13786


More information about the hotspot-dev mailing list