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.