JDK-8314172 : JVMCI ConstantPool uses incorrect names for parameters
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-08-11
  • Updated: 2023-08-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
For example:

https://github.com/openjdk/jdk/blob/8f1c134848437d7e37fb3b4bd603b91798e19724/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/ConstantPool.java#L110-L125

    /**
     * @param cpi the constant pool index
     */
    JavaMethod lookupMethod(int cpi, int opcode, ResolvedJavaMethod caller);

The name "cpi" is incorrect. It cannot be used to access the cpi-th entry of a ConstantPool.

It should be rawIndex, as the index is constructed by the JVMCI compiler from the two bytes that follow an invokexxxx opcode in the bytecode stream of a HotSpot Method that has already been linked.
Comments
Turning into an RFE since parameter names are just misleading but not an actual problem.
14-08-2023