comparison 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
comparison
equal deleted inserted replaced
21719:cbe8cc0f79ce 21720:d915361cc3a1
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.jvmci.bytecode.*;
31 import com.oracle.jvmci.common.*; 30 import com.oracle.jvmci.common.*;
32 import com.oracle.jvmci.meta.*; 31 import com.oracle.jvmci.meta.*;
33 32
34 /** 33 /**
35 * Implementation of {@link ConstantPool} for HotSpot. 34 * Implementation of {@link ConstantPool} for HotSpot.
36 */ 35 */
37 public class HotSpotConstantPool implements ConstantPool, HotSpotProxified { 36 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 }
38 74
39 /** 75 /**
40 * Enum of all {@code JVM_CONSTANT} constants used in the VM. This includes the public and 76 * Enum of all {@code JVM_CONSTANT} constants used in the VM. This includes the public and
41 * internal ones. 77 * internal ones.
42 */ 78 */