Mercurial > hg > truffle
annotate agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | 71afdabfd05b |
children | f16e75e0cf11 |
rev | line source |
---|---|
0 | 1 /* |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6100
diff
changeset
|
2 * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1385
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1385
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1385
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
25 package sun.jvm.hotspot.runtime; | |
26 | |
27 public interface ClassConstants | |
28 { | |
29 // constant pool constant types - from JVM spec. | |
30 | |
31 public static final int JVM_CONSTANT_Utf8 = 1; | |
32 public static final int JVM_CONSTANT_Unicode = 2; // unused | |
33 public static final int JVM_CONSTANT_Integer = 3; | |
34 public static final int JVM_CONSTANT_Float = 4; | |
35 public static final int JVM_CONSTANT_Long = 5; | |
36 public static final int JVM_CONSTANT_Double = 6; | |
37 public static final int JVM_CONSTANT_Class = 7; | |
38 public static final int JVM_CONSTANT_String = 8; | |
39 public static final int JVM_CONSTANT_Fieldref = 9; | |
40 public static final int JVM_CONSTANT_Methodref = 10; | |
41 public static final int JVM_CONSTANT_InterfaceMethodref = 11; | |
42 public static final int JVM_CONSTANT_NameAndType = 12; | |
1602 | 43 public static final int JVM_CONSTANT_MethodHandle = 15; |
44 public static final int JVM_CONSTANT_MethodType = 16; | |
2460 | 45 // static final int JVM_CONSTANT_(unused) = 17; |
1913
3b2dea75431e
6984311: JSR 292 needs optional bootstrap method parameters
jrose
parents:
1660
diff
changeset
|
46 public static final int JVM_CONSTANT_InvokeDynamic = 18; |
1602 | 47 |
48 // JVM_CONSTANT_MethodHandle subtypes | |
49 public static final int JVM_REF_getField = 1; | |
50 public static final int JVM_REF_getStatic = 2; | |
51 public static final int JVM_REF_putField = 3; | |
52 public static final int JVM_REF_putStatic = 4; | |
53 public static final int JVM_REF_invokeVirtual = 5; | |
54 public static final int JVM_REF_invokeStatic = 6; | |
55 public static final int JVM_REF_invokeSpecial = 7; | |
56 public static final int JVM_REF_newInvokeSpecial = 8; | |
57 public static final int JVM_REF_invokeInterface = 9; | |
0 | 58 |
59 // HotSpot specific constant pool constant types. | |
60 | |
61 // For bad value initialization | |
62 public static final int JVM_CONSTANT_Invalid = 0; | |
63 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6100
diff
changeset
|
64 public static final int JVM_CONSTANT_UnresolvedClass = 100; // Temporary tag until actual use |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6100
diff
changeset
|
65 public static final int JVM_CONSTANT_ClassIndex = 101; // Temporary tag while constructing constant pool |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6100
diff
changeset
|
66 public static final int JVM_CONSTANT_StringIndex = 102; // Temporary tag while constructing constant pool |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6100
diff
changeset
|
67 public static final int JVM_CONSTANT_UnresolvedClassInError = 103; // Error tag due to resolution error |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6100
diff
changeset
|
68 public static final int JVM_CONSTANT_MethodHandleInError = 104; // Error tag due to resolution error |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6100
diff
changeset
|
69 public static final int JVM_CONSTANT_MethodTypeInError = 105; // Error tag due to resolution error |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6100
diff
changeset
|
70 public static final int JVM_CONSTANT_Object = 106; // Required for BoundMethodHandle arguments. |
1385 | 71 |
0 | 72 // 1.5 major/minor version numbers from JVM spec. 3rd edition |
73 public static final short MAJOR_VERSION = 49; | |
74 public static final short MINOR_VERSION = 0; | |
75 | |
76 public static final short MAJOR_VERSION_OLD = 46; | |
77 public static final short MINOR_VERSION_OLD = 0; | |
78 | |
79 // From jvm.h | |
80 public static final long JVM_ACC_PUBLIC = 0x0001; /* visible to everyone */ | |
81 public static final long JVM_ACC_PRIVATE = 0x0002; /* visible only to the defining class */ | |
82 public static final long JVM_ACC_PROTECTED = 0x0004; /* visible to subclasses */ | |
83 public static final long JVM_ACC_STATIC = 0x0008; /* instance variable is static */ | |
84 public static final long JVM_ACC_FINAL = 0x0010; /* no further subclassing, overriding */ | |
85 public static final long JVM_ACC_SYNCHRONIZED = 0x0020; /* wrap method call in monitor lock */ | |
86 public static final long JVM_ACC_SUPER = 0x0020; /* funky handling of invokespecial */ | |
87 public static final long JVM_ACC_VOLATILE = 0x0040; /* can not cache in registers */ | |
88 public static final long JVM_ACC_BRIDGE = 0x0040; /* bridge method generated by compiler */ | |
89 public static final long JVM_ACC_TRANSIENT = 0x0080; /* not persistant */ | |
90 public static final long JVM_ACC_VARARGS = 0x0080; /* method declared with variable number of args */ | |
91 public static final long JVM_ACC_NATIVE = 0x0100; /* implemented in C */ | |
92 public static final long JVM_ACC_INTERFACE = 0x0200; /* class is an interface */ | |
93 public static final long JVM_ACC_ABSTRACT = 0x0400; /* no definition provided */ | |
94 public static final long JVM_ACC_STRICT = 0x0800; /* strict floating point */ | |
95 public static final long JVM_ACC_SYNTHETIC = 0x1000; /* compiler-generated class, method or field */ | |
96 public static final long JVM_ACC_ANNOTATION = 0x2000; /* annotation type */ | |
97 public static final long JVM_ACC_ENUM = 0x4000; /* field is declared as element of enum */ | |
98 | |
99 | |
100 // from accessFlags.hpp - hotspot internal flags | |
101 | |
102 // flags actually put in .class file | |
103 public static final long JVM_ACC_WRITTEN_FLAGS = 0x00007FFF; | |
104 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6100
diff
changeset
|
105 // Method* flags |
0 | 106 // monitorenter/monitorexit bytecodes match |
107 public static final long JVM_ACC_MONITOR_MATCH = 0x10000000; | |
108 // Method contains monitorenter/monitorexit bytecodes | |
109 public static final long JVM_ACC_HAS_MONITOR_BYTECODES = 0x20000000; | |
110 // Method has loops | |
111 public static final long JVM_ACC_HAS_LOOPS = 0x40000000; | |
112 // The loop flag has been initialized | |
113 public static final long JVM_ACC_LOOPS_FLAG_INIT = (int)0x80000000; | |
114 // Queued for compilation | |
115 public static final long JVM_ACC_QUEUED = 0x01000000; | |
116 // TEMPORARY: currently on stack replacement compilation is not built into the | |
117 // invocation counter machinery. Until it is, we will keep track of methods which | |
118 // cannot be on stack replaced in the access flags. | |
119 public static final long JVM_ACC_NOT_OSR_COMPILABLE = 0x08000000; | |
120 public static final long JVM_ACC_HAS_LINE_NUMBER_TABLE = 0x00100000; | |
121 public static final long JVM_ACC_HAS_CHECKED_EXCEPTIONS = 0x00400000; | |
122 public static final long JVM_ACC_HAS_JSRS = 0x00800000; | |
123 // RedefineClasses() has made method obsolete | |
124 public static final long JVM_ACC_IS_OBSOLETE = 0x00010000; | |
125 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6100
diff
changeset
|
126 // Klass* flags |
0 | 127 // True if this class has miranda methods in it's vtable |
128 public static final long JVM_ACC_HAS_MIRANDA_METHODS = 0x10000000; | |
129 // True if klass has a vanilla default constructor | |
130 public static final long JVM_ACC_HAS_VANILLA_CONSTRUCTOR = 0x20000000; | |
131 // True if klass has a non-empty finalize() method | |
132 public static final long JVM_ACC_HAS_FINALIZER = 0x40000000; | |
133 // True if klass supports the Clonable interface | |
134 public static final long JVM_ACC_IS_CLONEABLE = 0x80000000; | |
135 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6100
diff
changeset
|
136 // Klass* and Method* flags |
0 | 137 public static final long JVM_ACC_HAS_LOCAL_VARIABLE_TABLE = 0x00200000; |
138 // flags promoted from methods to the holding klass | |
139 public static final long JVM_ACC_PROMOTED_FLAGS = 0x00200000; | |
140 | |
141 // field flags | |
142 // Note: these flags must be defined in the low order 16 bits because | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6100
diff
changeset
|
143 // InstanceKlass only stores a ushort worth of information from the |
0 | 144 // AccessFlags value. |
145 // field access is watched by JVMTI | |
146 public static final long JVM_ACC_FIELD_ACCESS_WATCHED = 0x00002000; | |
147 // field modification is watched by JVMTI | |
148 public static final long JVM_ACC_FIELD_MODIFICATION_WATCHED = 0x00008000; | |
6100
71afdabfd05b
7168280: Eliminate the generic signature index slot from field array for field without generic signature.
jiangli
parents:
2460
diff
changeset
|
149 // field has generic signature |
71afdabfd05b
7168280: Eliminate the generic signature index slot from field array for field without generic signature.
jiangli
parents:
2460
diff
changeset
|
150 public static final long JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE = 0x00000800; |
0 | 151 |
152 // flags accepted by set_field_flags | |
153 public static final long JVM_ACC_FIELD_FLAGS = 0x00008000 | JVM_ACC_WRITTEN_FLAGS; | |
154 | |
155 // from jvm.h | |
156 | |
157 public static final long JVM_RECOGNIZED_CLASS_MODIFIERS = (JVM_ACC_PUBLIC | | |
705 | 158 JVM_ACC_FINAL | |
159 JVM_ACC_SUPER | | |
160 JVM_ACC_INTERFACE | | |
161 JVM_ACC_ABSTRACT | | |
162 JVM_ACC_ANNOTATION | | |
163 JVM_ACC_ENUM | | |
164 JVM_ACC_SYNTHETIC); | |
0 | 165 |
166 | |
167 public static final long JVM_RECOGNIZED_FIELD_MODIFIERS = (JVM_ACC_PUBLIC | | |
705 | 168 JVM_ACC_PRIVATE | |
169 JVM_ACC_PROTECTED | | |
170 JVM_ACC_STATIC | | |
171 JVM_ACC_FINAL | | |
172 JVM_ACC_VOLATILE | | |
173 JVM_ACC_TRANSIENT | | |
174 JVM_ACC_ENUM | | |
175 JVM_ACC_SYNTHETIC); | |
0 | 176 |
177 public static final long JVM_RECOGNIZED_METHOD_MODIFIERS = (JVM_ACC_PUBLIC | | |
705 | 178 JVM_ACC_PRIVATE | |
179 JVM_ACC_PROTECTED | | |
180 JVM_ACC_STATIC | | |
181 JVM_ACC_FINAL | | |
182 JVM_ACC_SYNCHRONIZED | | |
183 JVM_ACC_BRIDGE | | |
184 JVM_ACC_VARARGS | | |
185 JVM_ACC_NATIVE | | |
186 JVM_ACC_ABSTRACT | | |
187 JVM_ACC_STRICT | | |
188 JVM_ACC_SYNTHETIC); | |
0 | 189 } |