comparison graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotConstantPool.java @ 21712:a59a0c85650a

removed redundant definition of JVM opcodes
author Doug Simon <doug.simon@oracle.com>
date Wed, 03 Jun 2015 21:53:28 +0200
parents 48c1ebd24120
children 454a99ca00a9
comparison
equal deleted inserted replaced
21711:1c41d00e6b2f 21712:a59a0c85650a
25 import static com.oracle.jvmci.common.UnsafeAccess.*; 25 import static com.oracle.jvmci.common.UnsafeAccess.*;
26 import static com.oracle.jvmci.hotspot.HotSpotJVMCIRuntime.*; 26 import static com.oracle.jvmci.hotspot.HotSpotJVMCIRuntime.*;
27 27
28 import java.lang.invoke.*; 28 import java.lang.invoke.*;
29 29
30 import com.oracle.graal.bytecode.*;
30 import com.oracle.jvmci.common.*; 31 import com.oracle.jvmci.common.*;
31 import com.oracle.jvmci.meta.*; 32 import com.oracle.jvmci.meta.*;
32 33
33 /** 34 /**
34 * Implementation of {@link ConstantPool} for HotSpot. 35 * Implementation of {@link ConstantPool} for HotSpot.
35 */ 36 */
36 public class HotSpotConstantPool implements ConstantPool, HotSpotProxified { 37 public class HotSpotConstantPool implements ConstantPool, HotSpotProxified {
37
38 /**
39 * Subset of JVM bytecode opcodes used by {@link HotSpotConstantPool}.
40 */
41 static class Bytecodes {
42 public static final int LDC = 18; // 0x12
43 public static final int LDC_W = 19; // 0x13
44 public static final int LDC2_W = 20; // 0x14
45 public static final int GETSTATIC = 178; // 0xB2
46 public static final int PUTSTATIC = 179; // 0xB3
47 public static final int GETFIELD = 180; // 0xB4
48 public static final int PUTFIELD = 181; // 0xB5
49 public static final int INVOKEVIRTUAL = 182; // 0xB6
50 public static final int INVOKESPECIAL = 183; // 0xB7
51 public static final int INVOKESTATIC = 184; // 0xB8
52 public static final int INVOKEINTERFACE = 185; // 0xB9
53 public static final int INVOKEDYNAMIC = 186; // 0xBA
54 public static final int NEW = 187; // 0xBB
55 public static final int NEWARRAY = 188; // 0xBC
56 public static final int ANEWARRAY = 189; // 0xBD
57 public static final int CHECKCAST = 192; // 0xC0
58 public static final int INSTANCEOF = 193; // 0xC1
59 public static final int MULTIANEWARRAY = 197; // 0xC5
60
61 static boolean isInvoke(int opcode) {
62 switch (opcode) {
63 case INVOKEVIRTUAL:
64 case INVOKESPECIAL:
65 case INVOKESTATIC:
66 case INVOKEINTERFACE:
67 case INVOKEDYNAMIC:
68 return true;
69 default:
70 return false;
71 }
72 }
73 }
74 38
75 /** 39 /**
76 * Enum of all {@code JVM_CONSTANT} constants used in the VM. This includes the public and 40 * Enum of all {@code JVM_CONSTANT} constants used in the VM. This includes the public and
77 * internal ones. 41 * internal ones.
78 */ 42 */