comparison agent/src/share/classes/sun/jvm/hotspot/utilities/ConstantTag.java @ 2011:dad31fc330cd

7001379: bootstrap method data needs to be moved from constant pool to a classfile attribute Reviewed-by: twisti
author jrose
date Fri, 03 Dec 2010 15:53:57 -0800
parents 3b2dea75431e
children ed69575596ac
comparison
equal deleted inserted replaced
2010:7601ab0e1e33 2011:dad31fc330cd
38 private static int JVM_CONSTANT_Methodref = 10; 38 private static int JVM_CONSTANT_Methodref = 10;
39 private static int JVM_CONSTANT_InterfaceMethodref = 11; 39 private static int JVM_CONSTANT_InterfaceMethodref = 11;
40 private static int JVM_CONSTANT_NameAndType = 12; 40 private static int JVM_CONSTANT_NameAndType = 12;
41 private static int JVM_CONSTANT_MethodHandle = 15; // JSR 292 41 private static int JVM_CONSTANT_MethodHandle = 15; // JSR 292
42 private static int JVM_CONSTANT_MethodType = 16; // JSR 292 42 private static int JVM_CONSTANT_MethodType = 16; // JSR 292
43 // static int JVM_CONSTANT_InvokeDynamicTrans = 17; // JSR 292, only occurs in old class files 43 private static int JVM_CONSTANT_InvokeDynamicTrans = 17; // JSR 292, only occurs in old class files
44 private static int JVM_CONSTANT_InvokeDynamic = 18; // JSR 292 44 private static int JVM_CONSTANT_InvokeDynamic = 18; // JSR 292
45 private static int JVM_CONSTANT_Invalid = 0; // For bad value initialization 45 private static int JVM_CONSTANT_Invalid = 0; // For bad value initialization
46 private static int JVM_CONSTANT_UnresolvedClass = 100; // Temporary tag until actual use 46 private static int JVM_CONSTANT_UnresolvedClass = 100; // Temporary tag until actual use
47 private static int JVM_CONSTANT_ClassIndex = 101; // Temporary tag while constructing constant pool 47 private static int JVM_CONSTANT_ClassIndex = 101; // Temporary tag while constructing constant pool
48 private static int JVM_CONSTANT_UnresolvedString = 102; // Temporary tag until actual use 48 private static int JVM_CONSTANT_UnresolvedString = 102; // Temporary tag until actual use
65 65
66 public ConstantTag(byte tag) { 66 public ConstantTag(byte tag) {
67 this.tag = tag; 67 this.tag = tag;
68 } 68 }
69 69
70 public int value() { return tag; }
71
70 public boolean isKlass() { return tag == JVM_CONSTANT_Class; } 72 public boolean isKlass() { return tag == JVM_CONSTANT_Class; }
71 public boolean isField () { return tag == JVM_CONSTANT_Fieldref; } 73 public boolean isField () { return tag == JVM_CONSTANT_Fieldref; }
72 public boolean isMethod() { return tag == JVM_CONSTANT_Methodref; } 74 public boolean isMethod() { return tag == JVM_CONSTANT_Methodref; }
73 public boolean isInterfaceMethod() { return tag == JVM_CONSTANT_InterfaceMethodref; } 75 public boolean isInterfaceMethod() { return tag == JVM_CONSTANT_InterfaceMethodref; }
74 public boolean isString() { return tag == JVM_CONSTANT_String; } 76 public boolean isString() { return tag == JVM_CONSTANT_String; }
79 public boolean isNameAndType() { return tag == JVM_CONSTANT_NameAndType; } 81 public boolean isNameAndType() { return tag == JVM_CONSTANT_NameAndType; }
80 public boolean isUtf8() { return tag == JVM_CONSTANT_Utf8; } 82 public boolean isUtf8() { return tag == JVM_CONSTANT_Utf8; }
81 public boolean isMethodHandle() { return tag == JVM_CONSTANT_MethodHandle; } 83 public boolean isMethodHandle() { return tag == JVM_CONSTANT_MethodHandle; }
82 public boolean isMethodType() { return tag == JVM_CONSTANT_MethodType; } 84 public boolean isMethodType() { return tag == JVM_CONSTANT_MethodType; }
83 public boolean isInvokeDynamic() { return tag == JVM_CONSTANT_InvokeDynamic; } 85 public boolean isInvokeDynamic() { return tag == JVM_CONSTANT_InvokeDynamic; }
86 public boolean isInvokeDynamicTrans() { return tag == JVM_CONSTANT_InvokeDynamicTrans; }
84 87
85 public boolean isInvalid() { return tag == JVM_CONSTANT_Invalid; } 88 public boolean isInvalid() { return tag == JVM_CONSTANT_Invalid; }
86 89
87 public boolean isUnresolvedKlass() { 90 public boolean isUnresolvedKlass() {
88 return tag == JVM_CONSTANT_UnresolvedClass || tag == JVM_CONSTANT_UnresolvedClassInError; 91 return tag == JVM_CONSTANT_UnresolvedClass || tag == JVM_CONSTANT_UnresolvedClassInError;