Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8314172

JVMCI ConstantPool uses incorrect names for parameters

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • 22
    • hotspot

    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.

      Attachments

        Issue Links

          Activity

            People

              iklam Ioi Lam
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: