Skip to content


Browse files Browse the repository at this point in the history
8296960: [JVMCI] list HotSpotConstantPool.loadReferencedType to Const…

Backport-of: b3ef337566c2cf78de1f636e039c799a1bfcb17e
  • Loading branch information
jerboaa committed Nov 25, 2022
1 parent 20f2218 commit aec0884
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Expand Up @@ -716,6 +716,7 @@ public void loadReferencedType(int cpi, int opcode) {
loadReferencedType(cpi, opcode, true /* initialize */);

public void loadReferencedType(int cpi, int opcode, boolean initialize) {
int index;
Expand Down
Expand Up @@ -46,6 +46,24 @@ public interface ConstantPool {
void loadReferencedType(int cpi, int opcode);

* Ensures that the type referenced by the specified constant pool entry is loaded. This can be
* used to compile time resolve a type. It works for field, method, or type constant pool
* entries.
* @param cpi the index of the constant pool entry that references the type
* @param opcode the opcode of the instruction that references the type
* @param initialize if {@code true}, the referenced type is either guaranteed to be initialized
* upon return or an initialization exception is thrown
default void loadReferencedType(int cpi, int opcode, boolean initialize) {
if (initialize) {
loadReferencedType(cpi, opcode);
} else {
throw new UnsupportedOperationException();

* Looks up the type referenced by the constant pool entry at {@code cpi} as referenced by the
* {@code opcode} bytecode instruction.
Expand Down

1 comment on commit aec0884

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.