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

[JVMCI] CompilerToVM methods "resolveConstantInPool" and "resolvePossiblyCachedConstantInPool" have poor javadoc

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • generic
    • generic

      The jdk.internal.jvmci.hotspot.CompilerToVM methods "resolveConstantInPool" and "resolvePossiblyCachedConstantInPool" have poor documentation.

      Javadoc says only "The behavior of this method is undefined if cpi does not denote an entry that can be resolved to an object."

      So there is no information about what exact constant pool types from the JVM spec (https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4-140) are supported by each method and what limitations exist for each of the constant pool types.

      What entries of what types can be resolved to an object?

      For example method "resolveConstantInPool" does not work (returns null) if applied to CONSTANT_String of CONSTANT_Utf8 entry.

      Method "resolvePossiblyCachedConstantInPool" does not work (returns null) if applied to CONSTANT_Utf8 entry, but works with CONSTANT_String.

            dnsimon Douglas Simon
            kshefov Konstantin Shefov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: