Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotConstantPool.java @ 21720:d915361cc3a1
moved asm, bytecode and asm.test code back to com.oracle.graal name space (JBS:GRAAL-53)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 04 Jun 2015 13:35:47 +0200 |
parents | 454a99ca00a9 |
children | 3d15183f3c93 |
line wrap: on
line diff
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotConstantPool.java Thu Jun 04 09:17:32 2015 +0200 +++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotConstantPool.java Thu Jun 04 13:35:47 2015 +0200 @@ -27,7 +27,6 @@ import java.lang.invoke.*; -import com.oracle.jvmci.bytecode.*; import com.oracle.jvmci.common.*; import com.oracle.jvmci.meta.*; @@ -37,6 +36,43 @@ public class HotSpotConstantPool implements ConstantPool, HotSpotProxified { /** + * Subset of JVM bytecode opcodes used by {@link HotSpotConstantPool}. + */ + static class Bytecodes { + public static final int LDC = 18; // 0x12 + public static final int LDC_W = 19; // 0x13 + public static final int LDC2_W = 20; // 0x14 + public static final int GETSTATIC = 178; // 0xB2 + public static final int PUTSTATIC = 179; // 0xB3 + public static final int GETFIELD = 180; // 0xB4 + public static final int PUTFIELD = 181; // 0xB5 + public static final int INVOKEVIRTUAL = 182; // 0xB6 + public static final int INVOKESPECIAL = 183; // 0xB7 + public static final int INVOKESTATIC = 184; // 0xB8 + public static final int INVOKEINTERFACE = 185; // 0xB9 + public static final int INVOKEDYNAMIC = 186; // 0xBA + public static final int NEW = 187; // 0xBB + public static final int NEWARRAY = 188; // 0xBC + public static final int ANEWARRAY = 189; // 0xBD + public static final int CHECKCAST = 192; // 0xC0 + public static final int INSTANCEOF = 193; // 0xC1 + public static final int MULTIANEWARRAY = 197; // 0xC5 + + static boolean isInvoke(int opcode) { + switch (opcode) { + case INVOKEVIRTUAL: + case INVOKESPECIAL: + case INVOKESTATIC: + case INVOKEINTERFACE: + case INVOKEDYNAMIC: + return true; + default: + return false; + } + } + } + + /** * Enum of all {@code JVM_CONSTANT} constants used in the VM. This includes the public and * internal ones. */