author | phh |
Tue, 24 Mar 2009 21:56:53 -0400 | |
changeset 2336 | 427ce3320578 |
parent 2259 | d3c946e7f127 |
child 2342 | 9a1260c3679d |
permissions | -rw-r--r-- |
1 | 1 |
/* |
2255
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
1890
diff
changeset
|
2 |
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. |
1 | 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 |
* |
|
19 |
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
20 |
* CA 95054 USA or visit www.sun.com if you need additional information or |
|
21 |
* have any questions. |
|
22 |
* |
|
23 |
*/ |
|
24 |
||
25 |
// The classes vmSymbols and vmSymbolHandles are a name spaces for fast lookup of |
|
26 |
// symbols commonly used in the VM. The first class return a symbolOop, while the |
|
27 |
// second class returns a SymbolHandle. The underlying data structure is shared |
|
28 |
// between the two classes. |
|
29 |
// |
|
30 |
// Sample usage: |
|
31 |
// |
|
32 |
// symbolOop obj = vmSymbols::java_lang_Object()(); |
|
33 |
// SymbolHandle handle = vmSymbolHandles::java_lang_Object(); |
|
34 |
||
35 |
||
36 |
// Useful sub-macros exported by this header file: |
|
37 |
||
38 |
#define VM_SYMBOL_ENUM_NAME(name) name##_enum |
|
39 |
#define VM_INTRINSIC_IGNORE(id, class, name, sig, flags) /*ignored*/ |
|
40 |
#define VM_SYMBOL_IGNORE(id, name) /*ignored*/ |
|
41 |
#define VM_ALIAS_IGNORE(id, id2) /*ignored*/ |
|
42 |
||
43 |
||
44 |
// Mapping function names to values. New entries should be added below. |
|
45 |
||
46 |
#define VM_SYMBOLS_DO(template, do_alias) \ |
|
47 |
/* commonly used class names */ \ |
|
48 |
template(java_lang_System, "java/lang/System") \ |
|
49 |
template(java_lang_Object, "java/lang/Object") \ |
|
50 |
template(java_lang_Class, "java/lang/Class") \ |
|
51 |
template(java_lang_String, "java/lang/String") \ |
|
2336
427ce3320578
6810653: Change String cache class used by Hotspot from String to StringValue
phh
parents:
2259
diff
changeset
|
52 |
template(java_lang_StringValue, "java/lang/StringValue") \ |
1 | 53 |
template(java_lang_Thread, "java/lang/Thread") \ |
54 |
template(java_lang_ThreadGroup, "java/lang/ThreadGroup") \ |
|
55 |
template(java_lang_Cloneable, "java/lang/Cloneable") \ |
|
56 |
template(java_lang_Throwable, "java/lang/Throwable") \ |
|
57 |
template(java_lang_ClassLoader, "java/lang/ClassLoader") \ |
|
58 |
template(java_lang_ClassLoader_NativeLibrary, "java/lang/ClassLoader\x024NativeLibrary") \ |
|
59 |
template(java_lang_ThreadDeath, "java/lang/ThreadDeath") \ |
|
60 |
template(java_lang_Boolean, "java/lang/Boolean") \ |
|
61 |
template(java_lang_Character, "java/lang/Character") \ |
|
190
e9a0a9dcd4f6
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
never
parents:
1
diff
changeset
|
62 |
template(java_lang_Character_CharacterCache, "java/lang/Character$CharacterCache") \ |
1 | 63 |
template(java_lang_Float, "java/lang/Float") \ |
64 |
template(java_lang_Double, "java/lang/Double") \ |
|
65 |
template(java_lang_Byte, "java/lang/Byte") \ |
|
190
e9a0a9dcd4f6
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
never
parents:
1
diff
changeset
|
66 |
template(java_lang_Byte_Cache, "java/lang/Byte$ByteCache") \ |
1 | 67 |
template(java_lang_Short, "java/lang/Short") \ |
190
e9a0a9dcd4f6
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
never
parents:
1
diff
changeset
|
68 |
template(java_lang_Short_ShortCache, "java/lang/Short$ShortCache") \ |
1 | 69 |
template(java_lang_Integer, "java/lang/Integer") \ |
190
e9a0a9dcd4f6
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
never
parents:
1
diff
changeset
|
70 |
template(java_lang_Integer_IntegerCache, "java/lang/Integer$IntegerCache") \ |
1 | 71 |
template(java_lang_Long, "java/lang/Long") \ |
190
e9a0a9dcd4f6
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
never
parents:
1
diff
changeset
|
72 |
template(java_lang_Long_LongCache, "java/lang/Long$LongCache") \ |
1 | 73 |
template(java_lang_Shutdown, "java/lang/Shutdown") \ |
74 |
template(java_lang_ref_Reference, "java/lang/ref/Reference") \ |
|
75 |
template(java_lang_ref_SoftReference, "java/lang/ref/SoftReference") \ |
|
76 |
template(java_lang_ref_WeakReference, "java/lang/ref/WeakReference") \ |
|
77 |
template(java_lang_ref_FinalReference, "java/lang/ref/FinalReference") \ |
|
78 |
template(java_lang_ref_PhantomReference, "java/lang/ref/PhantomReference") \ |
|
79 |
template(java_lang_ref_Finalizer, "java/lang/ref/Finalizer") \ |
|
80 |
template(java_lang_reflect_AccessibleObject, "java/lang/reflect/AccessibleObject") \ |
|
81 |
template(java_lang_reflect_Method, "java/lang/reflect/Method") \ |
|
82 |
template(java_lang_reflect_Constructor, "java/lang/reflect/Constructor") \ |
|
83 |
template(java_lang_reflect_Field, "java/lang/reflect/Field") \ |
|
84 |
template(java_lang_reflect_Array, "java/lang/reflect/Array") \ |
|
85 |
template(java_lang_StringBuffer, "java/lang/StringBuffer") \ |
|
86 |
template(java_lang_CharSequence, "java/lang/CharSequence") \ |
|
87 |
template(java_security_AccessControlContext, "java/security/AccessControlContext") \ |
|
88 |
template(java_security_ProtectionDomain, "java/security/ProtectionDomain") \ |
|
89 |
template(java_io_OutputStream, "java/io/OutputStream") \ |
|
90 |
template(java_io_Reader, "java/io/Reader") \ |
|
91 |
template(java_io_BufferedReader, "java/io/BufferedReader") \ |
|
92 |
template(java_io_FileInputStream, "java/io/FileInputStream") \ |
|
93 |
template(java_io_ByteArrayInputStream, "java/io/ByteArrayInputStream") \ |
|
94 |
template(java_io_Serializable, "java/io/Serializable") \ |
|
95 |
template(java_util_Arrays, "java/util/Arrays") \ |
|
96 |
template(java_util_Properties, "java/util/Properties") \ |
|
97 |
template(java_util_Vector, "java/util/Vector") \ |
|
98 |
template(java_util_AbstractList, "java/util/AbstractList") \ |
|
99 |
template(java_util_Hashtable, "java/util/Hashtable") \ |
|
191
314312979e7a
6621621: HashMap front cache should be enabled only with AggressiveOpts
phh
parents:
190
diff
changeset
|
100 |
template(java_util_HashMap, "java/util/HashMap") \ |
1 | 101 |
template(java_lang_Compiler, "java/lang/Compiler") \ |
102 |
template(sun_misc_Signal, "sun/misc/Signal") \ |
|
103 |
template(java_lang_AssertionStatusDirectives, "java/lang/AssertionStatusDirectives") \ |
|
191
314312979e7a
6621621: HashMap front cache should be enabled only with AggressiveOpts
phh
parents:
190
diff
changeset
|
104 |
template(sun_jkernel_DownloadManager, "sun/jkernel/DownloadManager") \ |
1 | 105 |
template(getBootClassPathEntryForClass_name, "getBootClassPathEntryForClass") \ |
106 |
\ |
|
107 |
/* class file format tags */ \ |
|
108 |
template(tag_source_file, "SourceFile") \ |
|
109 |
template(tag_inner_classes, "InnerClasses") \ |
|
110 |
template(tag_constant_value, "ConstantValue") \ |
|
111 |
template(tag_code, "Code") \ |
|
112 |
template(tag_exceptions, "Exceptions") \ |
|
113 |
template(tag_line_number_table, "LineNumberTable") \ |
|
114 |
template(tag_local_variable_table, "LocalVariableTable") \ |
|
115 |
template(tag_local_variable_type_table, "LocalVariableTypeTable") \ |
|
116 |
template(tag_stack_map_table, "StackMapTable") \ |
|
117 |
template(tag_synthetic, "Synthetic") \ |
|
118 |
template(tag_deprecated, "Deprecated") \ |
|
119 |
template(tag_source_debug_extension, "SourceDebugExtension") \ |
|
120 |
template(tag_signature, "Signature") \ |
|
121 |
template(tag_runtime_visible_annotations, "RuntimeVisibleAnnotations") \ |
|
122 |
template(tag_runtime_invisible_annotations, "RuntimeInvisibleAnnotations") \ |
|
123 |
template(tag_runtime_visible_parameter_annotations, "RuntimeVisibleParameterAnnotations") \ |
|
124 |
template(tag_runtime_invisible_parameter_annotations,"RuntimeInvisibleParameterAnnotations") \ |
|
125 |
template(tag_annotation_default, "AnnotationDefault") \ |
|
126 |
template(tag_enclosing_method, "EnclosingMethod") \ |
|
127 |
\ |
|
128 |
/* exception klasses: at least all exceptions thrown by the VM have entries here */ \ |
|
129 |
template(java_lang_ArithmeticException, "java/lang/ArithmeticException") \ |
|
130 |
template(java_lang_ArrayIndexOutOfBoundsException, "java/lang/ArrayIndexOutOfBoundsException") \ |
|
131 |
template(java_lang_ArrayStoreException, "java/lang/ArrayStoreException") \ |
|
132 |
template(java_lang_ClassCastException, "java/lang/ClassCastException") \ |
|
133 |
template(java_lang_ClassNotFoundException, "java/lang/ClassNotFoundException") \ |
|
134 |
template(java_lang_CloneNotSupportedException, "java/lang/CloneNotSupportedException") \ |
|
135 |
template(java_lang_IllegalAccessException, "java/lang/IllegalAccessException") \ |
|
136 |
template(java_lang_IllegalArgumentException, "java/lang/IllegalArgumentException") \ |
|
137 |
template(java_lang_IllegalMonitorStateException, "java/lang/IllegalMonitorStateException") \ |
|
138 |
template(java_lang_IllegalThreadStateException, "java/lang/IllegalThreadStateException") \ |
|
139 |
template(java_lang_IndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException") \ |
|
140 |
template(java_lang_InstantiationException, "java/lang/InstantiationException") \ |
|
141 |
template(java_lang_InstantiationError, "java/lang/InstantiationError") \ |
|
142 |
template(java_lang_InterruptedException, "java/lang/InterruptedException") \ |
|
143 |
template(java_lang_LinkageError, "java/lang/LinkageError") \ |
|
144 |
template(java_lang_NegativeArraySizeException, "java/lang/NegativeArraySizeException") \ |
|
145 |
template(java_lang_NoSuchFieldException, "java/lang/NoSuchFieldException") \ |
|
146 |
template(java_lang_NoSuchMethodException, "java/lang/NoSuchMethodException") \ |
|
147 |
template(java_lang_NullPointerException, "java/lang/NullPointerException") \ |
|
148 |
template(java_lang_StringIndexOutOfBoundsException, "java/lang/StringIndexOutOfBoundsException")\ |
|
149 |
template(java_lang_InvalidClassException, "java/lang/InvalidClassException") \ |
|
150 |
template(java_lang_reflect_InvocationTargetException, "java/lang/reflect/InvocationTargetException") \ |
|
151 |
template(java_lang_Exception, "java/lang/Exception") \ |
|
152 |
template(java_lang_RuntimeException, "java/lang/RuntimeException") \ |
|
153 |
template(java_io_IOException, "java/io/IOException") \ |
|
154 |
template(java_security_PrivilegedActionException, "java/security/PrivilegedActionException") \ |
|
155 |
\ |
|
156 |
/* error klasses: at least all errors thrown by the VM have entries here */ \ |
|
157 |
template(java_lang_AbstractMethodError, "java/lang/AbstractMethodError") \ |
|
158 |
template(java_lang_ClassCircularityError, "java/lang/ClassCircularityError") \ |
|
159 |
template(java_lang_ClassFormatError, "java/lang/ClassFormatError") \ |
|
160 |
template(java_lang_UnsupportedClassVersionError, "java/lang/UnsupportedClassVersionError") \ |
|
161 |
template(java_lang_Error, "java/lang/Error") \ |
|
162 |
template(java_lang_ExceptionInInitializerError, "java/lang/ExceptionInInitializerError") \ |
|
163 |
template(java_lang_IllegalAccessError, "java/lang/IllegalAccessError") \ |
|
164 |
template(java_lang_IncompatibleClassChangeError, "java/lang/IncompatibleClassChangeError") \ |
|
165 |
template(java_lang_InternalError, "java/lang/InternalError") \ |
|
166 |
template(java_lang_NoClassDefFoundError, "java/lang/NoClassDefFoundError") \ |
|
167 |
template(java_lang_NoSuchFieldError, "java/lang/NoSuchFieldError") \ |
|
168 |
template(java_lang_NoSuchMethodError, "java/lang/NoSuchMethodError") \ |
|
169 |
template(java_lang_OutOfMemoryError, "java/lang/OutOfMemoryError") \ |
|
170 |
template(java_lang_UnsatisfiedLinkError, "java/lang/UnsatisfiedLinkError") \ |
|
171 |
template(java_lang_VerifyError, "java/lang/VerifyError") \ |
|
172 |
template(java_lang_SecurityException, "java/lang/SecurityException") \ |
|
173 |
template(java_lang_VirtualMachineError, "java/lang/VirtualMachineError") \ |
|
174 |
template(java_lang_StackOverflowError, "java/lang/StackOverflowError") \ |
|
175 |
template(java_lang_StackTraceElement, "java/lang/StackTraceElement") \ |
|
176 |
template(java_util_concurrent_locks_AbstractOwnableSynchronizer, "java/util/concurrent/locks/AbstractOwnableSynchronizer") \ |
|
177 |
\ |
|
178 |
/* class symbols needed by intrinsics */ \ |
|
179 |
VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, template, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \ |
|
180 |
\ |
|
181 |
/* Support for reflection based on dynamic bytecode generation (JDK 1.4 and above) */ \ |
|
182 |
\ |
|
183 |
template(sun_reflect_FieldInfo, "sun/reflect/FieldInfo") \ |
|
184 |
template(sun_reflect_MethodInfo, "sun/reflect/MethodInfo") \ |
|
185 |
template(sun_reflect_MagicAccessorImpl, "sun/reflect/MagicAccessorImpl") \ |
|
186 |
template(sun_reflect_MethodAccessorImpl, "sun/reflect/MethodAccessorImpl") \ |
|
187 |
template(sun_reflect_ConstructorAccessorImpl, "sun/reflect/ConstructorAccessorImpl") \ |
|
188 |
template(sun_reflect_SerializationConstructorAccessorImpl, "sun/reflect/SerializationConstructorAccessorImpl") \ |
|
189 |
template(sun_reflect_DelegatingClassLoader, "sun/reflect/DelegatingClassLoader") \ |
|
190 |
template(sun_reflect_Reflection, "sun/reflect/Reflection") \ |
|
191 |
template(checkedExceptions_name, "checkedExceptions") \ |
|
192 |
template(clazz_name, "clazz") \ |
|
193 |
template(exceptionTypes_name, "exceptionTypes") \ |
|
194 |
template(modifiers_name, "modifiers") \ |
|
195 |
template(newConstructor_name, "newConstructor") \ |
|
196 |
template(newConstructor_signature, "(Lsun/reflect/MethodInfo;)Ljava/lang/reflect/Constructor;") \ |
|
197 |
template(newField_name, "newField") \ |
|
198 |
template(newField_signature, "(Lsun/reflect/FieldInfo;)Ljava/lang/reflect/Field;") \ |
|
199 |
template(newMethod_name, "newMethod") \ |
|
200 |
template(newMethod_signature, "(Lsun/reflect/MethodInfo;)Ljava/lang/reflect/Method;") \ |
|
201 |
template(invoke_name, "invoke") \ |
|
202 |
template(override_name, "override") \ |
|
203 |
template(parameterTypes_name, "parameterTypes") \ |
|
204 |
template(returnType_name, "returnType") \ |
|
205 |
template(signature_name, "signature") \ |
|
206 |
template(slot_name, "slot") \ |
|
207 |
\ |
|
208 |
/* Support for annotations (JDK 1.5 and above) */ \ |
|
209 |
\ |
|
210 |
template(annotations_name, "annotations") \ |
|
211 |
template(parameter_annotations_name, "parameterAnnotations") \ |
|
212 |
template(annotation_default_name, "annotationDefault") \ |
|
213 |
template(sun_reflect_ConstantPool, "sun/reflect/ConstantPool") \ |
|
214 |
template(constantPoolOop_name, "constantPoolOop") \ |
|
215 |
template(sun_reflect_UnsafeStaticFieldAccessorImpl, "sun/reflect/UnsafeStaticFieldAccessorImpl")\ |
|
216 |
template(base_name, "base") \ |
|
217 |
\ |
|
218 |
/* common method names */ \ |
|
219 |
template(object_initializer_name, "<init>") \ |
|
220 |
template(class_initializer_name, "<clinit>") \ |
|
221 |
template(println_name, "println") \ |
|
222 |
template(printStackTrace_name, "printStackTrace") \ |
|
223 |
template(main_name, "main") \ |
|
224 |
template(name_name, "name") \ |
|
225 |
template(priority_name, "priority") \ |
|
226 |
template(stillborn_name, "stillborn") \ |
|
227 |
template(group_name, "group") \ |
|
228 |
template(daemon_name, "daemon") \ |
|
229 |
template(eetop_name, "eetop") \ |
|
230 |
template(thread_status_name, "threadStatus") \ |
|
231 |
template(run_method_name, "run") \ |
|
232 |
template(exit_method_name, "exit") \ |
|
233 |
template(add_method_name, "add") \ |
|
234 |
template(parent_name, "parent") \ |
|
235 |
template(threads_name, "threads") \ |
|
236 |
template(groups_name, "groups") \ |
|
237 |
template(maxPriority_name, "maxPriority") \ |
|
238 |
template(destroyed_name, "destroyed") \ |
|
239 |
template(vmAllowSuspension_name, "vmAllowSuspension") \ |
|
240 |
template(nthreads_name, "nthreads") \ |
|
241 |
template(ngroups_name, "ngroups") \ |
|
242 |
template(shutdown_method_name, "shutdown") \ |
|
243 |
template(finalize_method_name, "finalize") \ |
|
244 |
template(reference_lock_name, "lock") \ |
|
245 |
template(reference_discovered_name, "discovered") \ |
|
246 |
template(run_finalizers_on_exit_name, "runFinalizersOnExit") \ |
|
247 |
template(uncaughtException_name, "uncaughtException") \ |
|
248 |
template(dispatchUncaughtException_name, "dispatchUncaughtException") \ |
|
249 |
template(initializeSystemClass_name, "initializeSystemClass") \ |
|
250 |
template(loadClass_name, "loadClass") \ |
|
251 |
template(loadClassInternal_name, "loadClassInternal") \ |
|
252 |
template(get_name, "get") \ |
|
253 |
template(put_name, "put") \ |
|
254 |
template(type_name, "type") \ |
|
255 |
template(findNative_name, "findNative") \ |
|
256 |
template(deadChild_name, "deadChild") \ |
|
257 |
template(addClass_name, "addClass") \ |
|
258 |
template(getFromClass_name, "getFromClass") \ |
|
259 |
template(dispatch_name, "dispatch") \ |
|
260 |
template(getSystemClassLoader_name, "getSystemClassLoader") \ |
|
261 |
template(fillInStackTrace_name, "fillInStackTrace") \ |
|
262 |
template(getCause_name, "getCause") \ |
|
263 |
template(initCause_name, "initCause") \ |
|
264 |
template(setProperty_name, "setProperty") \ |
|
265 |
template(getProperty_name, "getProperty") \ |
|
266 |
template(context_name, "context") \ |
|
267 |
template(privilegedContext_name, "privilegedContext") \ |
|
268 |
template(contextClassLoader_name, "contextClassLoader") \ |
|
269 |
template(inheritedAccessControlContext_name, "inheritedAccessControlContext") \ |
|
270 |
template(isPrivileged_name, "isPrivileged") \ |
|
271 |
template(wait_name, "wait") \ |
|
272 |
template(checkPackageAccess_name, "checkPackageAccess") \ |
|
273 |
template(stackSize_name, "stackSize") \ |
|
274 |
template(thread_id_name, "tid") \ |
|
275 |
template(newInstance0_name, "newInstance0") \ |
|
276 |
template(limit_name, "limit") \ |
|
277 |
template(forName_name, "forName") \ |
|
278 |
template(forName0_name, "forName0") \ |
|
279 |
template(isJavaIdentifierStart_name, "isJavaIdentifierStart") \ |
|
280 |
template(isJavaIdentifierPart_name, "isJavaIdentifierPart") \ |
|
281 |
template(exclusive_owner_thread_name, "exclusiveOwnerThread") \ |
|
282 |
template(park_blocker_name, "parkBlocker") \ |
|
283 |
template(park_event_name, "nativeParkEventPointer") \ |
|
190
e9a0a9dcd4f6
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
never
parents:
1
diff
changeset
|
284 |
template(cache_field_name, "cache") \ |
1 | 285 |
template(value_name, "value") \ |
191
314312979e7a
6621621: HashMap front cache should be enabled only with AggressiveOpts
phh
parents:
190
diff
changeset
|
286 |
template(frontCacheEnabled_name, "frontCacheEnabled") \ |
618
9641c2c8f977
6714404: Add UseStringCache switch to enable String caching under AggressiveOpts
kvn
parents:
595
diff
changeset
|
287 |
template(stringCacheEnabled_name, "stringCacheEnabled") \ |
2255
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
1890
diff
changeset
|
288 |
template(bitCount_name, "bitCount") \ |
1 | 289 |
\ |
290 |
/* non-intrinsic name/signature pairs: */ \ |
|
291 |
template(register_method_name, "register") \ |
|
292 |
do_alias(register_method_signature, object_void_signature) \ |
|
293 |
\ |
|
294 |
/* name symbols needed by intrinsics */ \ |
|
295 |
VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, template, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \ |
|
296 |
\ |
|
297 |
/* common signatures names */ \ |
|
298 |
template(void_method_signature, "()V") \ |
|
299 |
template(void_int_signature, "()I") \ |
|
300 |
template(void_long_signature, "()J") \ |
|
301 |
template(void_boolean_signature, "()Z") \ |
|
302 |
template(int_void_signature, "(I)V") \ |
|
303 |
template(int_int_signature, "(I)I") \ |
|
304 |
template(int_bool_signature, "(I)Z") \ |
|
305 |
template(float_int_signature, "(F)I") \ |
|
306 |
template(double_long_signature, "(D)J") \ |
|
307 |
template(double_double_signature, "(D)D") \ |
|
308 |
template(int_float_signature, "(I)F") \ |
|
2255
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
1890
diff
changeset
|
309 |
template(long_int_signature, "(J)I") \ |
1 | 310 |
template(long_long_signature, "(J)J") \ |
311 |
template(long_double_signature, "(J)D") \ |
|
312 |
template(byte_signature, "B") \ |
|
313 |
template(char_signature, "C") \ |
|
314 |
template(double_signature, "D") \ |
|
315 |
template(float_signature, "F") \ |
|
316 |
template(int_signature, "I") \ |
|
317 |
template(long_signature, "J") \ |
|
318 |
template(short_signature, "S") \ |
|
319 |
template(bool_signature, "Z") \ |
|
320 |
template(void_signature, "V") \ |
|
321 |
template(byte_array_signature, "[B") \ |
|
322 |
template(char_array_signature, "[C") \ |
|
323 |
template(object_void_signature, "(Ljava/lang/Object;)V") \ |
|
324 |
template(object_int_signature, "(Ljava/lang/Object;)I") \ |
|
325 |
template(object_boolean_signature, "(Ljava/lang/Object;)Z") \ |
|
326 |
template(string_void_signature, "(Ljava/lang/String;)V") \ |
|
327 |
template(string_int_signature, "(Ljava/lang/String;)I") \ |
|
328 |
template(throwable_void_signature, "(Ljava/lang/Throwable;)V") \ |
|
329 |
template(void_throwable_signature, "()Ljava/lang/Throwable;") \ |
|
330 |
template(throwable_throwable_signature, "(Ljava/lang/Throwable;)Ljava/lang/Throwable;") \ |
|
331 |
template(class_void_signature, "(Ljava/lang/Class;)V") \ |
|
332 |
template(class_int_signature, "(Ljava/lang/Class;)I") \ |
|
333 |
template(class_boolean_signature, "(Ljava/lang/Class;)Z") \ |
|
334 |
template(throwable_string_void_signature, "(Ljava/lang/Throwable;Ljava/lang/String;)V") \ |
|
335 |
template(string_array_void_signature, "([Ljava/lang/String;)V") \ |
|
336 |
template(string_array_string_array_void_signature, "([Ljava/lang/String;[Ljava/lang/String;)V") \ |
|
337 |
template(thread_throwable_void_signature, "(Ljava/lang/Thread;Ljava/lang/Throwable;)V") \ |
|
338 |
template(thread_void_signature, "(Ljava/lang/Thread;)V") \ |
|
339 |
template(threadgroup_runnable_void_signature, "(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;)V") \ |
|
340 |
template(threadgroup_string_void_signature, "(Ljava/lang/ThreadGroup;Ljava/lang/String;)V") \ |
|
341 |
template(string_class_signature, "(Ljava/lang/String;)Ljava/lang/Class;") \ |
|
342 |
template(object_object_object_signature, "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \ |
|
343 |
template(string_string_string_signature, "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;") \ |
|
344 |
template(string_string_signature, "(Ljava/lang/String;)Ljava/lang/String;") \ |
|
345 |
template(classloader_string_long_signature, "(Ljava/lang/ClassLoader;Ljava/lang/String;)J") \ |
|
346 |
template(byte_array_void_signature, "([B)V") \ |
|
347 |
template(char_array_void_signature, "([C)V") \ |
|
348 |
template(int_int_void_signature, "(II)V") \ |
|
349 |
template(long_long_void_signature, "(JJ)V") \ |
|
350 |
template(void_classloader_signature, "()Ljava/lang/ClassLoader;") \ |
|
351 |
template(void_object_signature, "()Ljava/lang/Object;") \ |
|
352 |
template(void_class_signature, "()Ljava/lang/Class;") \ |
|
353 |
template(object_array_object_object_signature, "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;")\ |
|
354 |
template(exception_void_signature, "(Ljava/lang/Exception;)V") \ |
|
355 |
template(protectiondomain_signature, "[Ljava/security/ProtectionDomain;") \ |
|
356 |
template(accesscontrolcontext_signature, "Ljava/security/AccessControlContext;") \ |
|
357 |
template(class_protectiondomain_signature, "(Ljava/lang/Class;Ljava/security/ProtectionDomain;)V") \ |
|
358 |
template(thread_signature, "Ljava/lang/Thread;") \ |
|
359 |
template(thread_array_signature, "[Ljava/lang/Thread;") \ |
|
360 |
template(threadgroup_signature, "Ljava/lang/ThreadGroup;") \ |
|
361 |
template(threadgroup_array_signature, "[Ljava/lang/ThreadGroup;") \ |
|
362 |
template(class_array_signature, "[Ljava/lang/Class;") \ |
|
363 |
template(classloader_signature, "Ljava/lang/ClassLoader;") \ |
|
364 |
template(object_signature, "Ljava/lang/Object;") \ |
|
365 |
template(class_signature, "Ljava/lang/Class;") \ |
|
366 |
template(string_signature, "Ljava/lang/String;") \ |
|
367 |
template(reference_signature, "Ljava/lang/ref/Reference;") \ |
|
1890 | 368 |
template(concurrenthashmap_signature, "Ljava/util/concurrent/ConcurrentHashMap;") \ |
1 | 369 |
/* signature symbols needed by intrinsics */ \ |
370 |
VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, template, VM_ALIAS_IGNORE) \ |
|
371 |
\ |
|
372 |
/* symbol aliases needed by intrinsics */ \ |
|
373 |
VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, do_alias) \ |
|
374 |
\ |
|
375 |
/* returned by the C1 compiler in case there's not enough memory to allocate a new symbol*/ \ |
|
376 |
template(dummy_symbol_oop, "illegal symbol") \ |
|
377 |
\ |
|
378 |
/* used by ClassFormatError when class name is not known yet */ \ |
|
379 |
template(unknown_class_name, "<Unknown>") \ |
|
380 |
\ |
|
1890 | 381 |
/* used to identify class loaders handling parallel class loading */ \ |
382 |
template(parallelCapable_name, "parallelLockMap;") \ |
|
383 |
\ |
|
1 | 384 |
/* JVM monitoring and management support */ \ |
385 |
template(java_lang_StackTraceElement_array, "[Ljava/lang/StackTraceElement;") \ |
|
386 |
template(java_lang_management_ThreadState, "java/lang/management/ThreadState") \ |
|
387 |
template(java_lang_management_MemoryUsage, "java/lang/management/MemoryUsage") \ |
|
388 |
template(java_lang_management_ThreadInfo, "java/lang/management/ThreadInfo") \ |
|
389 |
template(sun_management_ManagementFactory, "sun/management/ManagementFactory") \ |
|
390 |
template(sun_management_Sensor, "sun/management/Sensor") \ |
|
391 |
template(sun_management_Agent, "sun/management/Agent") \ |
|
392 |
template(createMemoryPoolMBean_name, "createMemoryPoolMBean") \ |
|
393 |
template(createMemoryManagerMBean_name, "createMemoryManagerMBean") \ |
|
394 |
template(createGarbageCollectorMBean_name, "createGarbageCollectorMBean") \ |
|
395 |
template(createMemoryPoolMBean_signature, "(Ljava/lang/String;ZJJ)Ljava/lang/management/MemoryPoolMBean;") \ |
|
396 |
template(createMemoryManagerMBean_signature, "(Ljava/lang/String;)Ljava/lang/management/MemoryManagerMBean;") \ |
|
397 |
template(createGarbageCollectorMBean_signature, "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/management/GarbageCollectorMBean;") \ |
|
398 |
template(trigger_name, "trigger") \ |
|
399 |
template(clear_name, "clear") \ |
|
400 |
template(trigger_method_signature, "(ILjava/lang/management/MemoryUsage;)V") \ |
|
401 |
template(startAgent_name, "startAgent") \ |
|
402 |
template(java_lang_management_ThreadInfo_constructor_signature, "(Ljava/lang/Thread;ILjava/lang/Object;Ljava/lang/Thread;JJJJ[Ljava/lang/StackTraceElement;)V") \ |
|
403 |
template(java_lang_management_ThreadInfo_with_locks_constructor_signature, "(Ljava/lang/Thread;ILjava/lang/Object;Ljava/lang/Thread;JJJJ[Ljava/lang/StackTraceElement;[Ljava/lang/Object;[I[Ljava/lang/Object;)V") \ |
|
404 |
template(long_long_long_long_void_signature, "(JJJJ)V") \ |
|
405 |
\ |
|
406 |
template(java_lang_management_MemoryPoolMXBean, "java/lang/management/MemoryPoolMXBean") \ |
|
407 |
template(java_lang_management_MemoryManagerMXBean, "java/lang/management/MemoryManagerMXBean") \ |
|
408 |
template(java_lang_management_GarbageCollectorMXBean,"java/lang/management/GarbageCollectorMXBean") \ |
|
409 |
template(createMemoryPool_name, "createMemoryPool") \ |
|
410 |
template(createMemoryManager_name, "createMemoryManager") \ |
|
411 |
template(createGarbageCollector_name, "createGarbageCollector") \ |
|
412 |
template(createMemoryPool_signature, "(Ljava/lang/String;ZJJ)Ljava/lang/management/MemoryPoolMXBean;") \ |
|
413 |
template(createMemoryManager_signature, "(Ljava/lang/String;)Ljava/lang/management/MemoryManagerMXBean;") \ |
|
414 |
template(createGarbageCollector_signature, "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/management/GarbageCollectorMXBean;") \ |
|
415 |
template(addThreadDumpForMonitors_name, "addThreadDumpForMonitors") \ |
|
416 |
template(addThreadDumpForSynchronizers_name, "addThreadDumpForSynchronizers") \ |
|
417 |
template(addThreadDumpForMonitors_signature, "(Ljava/lang/management/ThreadInfo;[Ljava/lang/Object;[I)V") \ |
|
418 |
template(addThreadDumpForSynchronizers_signature, "(Ljava/lang/management/ThreadInfo;[Ljava/lang/Object;)V") \ |
|
419 |
\ |
|
420 |
/* JVMTI/java.lang.instrument support and VM Attach mechanism */ \ |
|
421 |
template(sun_misc_VMSupport, "sun/misc/VMSupport") \ |
|
422 |
template(appendToClassPathForInstrumentation_name, "appendToClassPathForInstrumentation") \ |
|
423 |
do_alias(appendToClassPathForInstrumentation_signature, string_void_signature) \ |
|
424 |
template(serializePropertiesToByteArray_name, "serializePropertiesToByteArray") \ |
|
425 |
template(serializePropertiesToByteArray_signature, "()[B") \ |
|
426 |
template(serializeAgentPropertiesToByteArray_name, "serializeAgentPropertiesToByteArray") \ |
|
427 |
template(classRedefinedCount_name, "classRedefinedCount") \ |
|
428 |
/*end*/ |
|
429 |
||
430 |
||
431 |
||
432 |
// Here are all the intrinsics known to the runtime and the CI. |
|
433 |
// Each intrinsic consists of a public enum name (like _hashCode), |
|
434 |
// followed by a specification of its klass, name, and signature: |
|
435 |
// template(<id>, <klass>, <name>, <sig>, <FCODE>) |
|
436 |
// |
|
437 |
// If you add an intrinsic here, you must also define its name |
|
438 |
// and signature as members of the VM symbols. The VM symbols for |
|
439 |
// the intrinsic name and signature may be defined above. |
|
440 |
// |
|
441 |
// Because the VM_SYMBOLS_DO macro makes reference to VM_INTRINSICS_DO, |
|
442 |
// you can also define an intrinsic's name and/or signature locally to the |
|
443 |
// intrinsic, if this makes sense. (It often does make sense.) |
|
444 |
// |
|
445 |
// For example: |
|
446 |
// do_intrinsic(_foo, java_lang_Object, foo_name, foo_signature, F_xx) |
|
447 |
// do_name( foo_name, "foo") |
|
448 |
// do_signature(foo_signature, "()F") |
|
449 |
// klass = vmSymbols::java_lang_Object() |
|
450 |
// name = vmSymbols::foo_name() |
|
451 |
// signature = vmSymbols::foo_signature() |
|
452 |
// |
|
453 |
// The name and/or signature might be a "well known" symbol |
|
454 |
// like "equal" or "()I", in which case there will be no local |
|
455 |
// re-definition of the symbol. |
|
456 |
// |
|
457 |
// The do_class, do_name, and do_signature calls are all used for the |
|
458 |
// same purpose: Define yet another VM symbol. They could all be merged |
|
459 |
// into a common 'do_symbol' call, but it seems useful to record our |
|
460 |
// intentions here about kinds of symbols (class vs. name vs. signature). |
|
461 |
// |
|
462 |
// The F_xx is one of the Flags enum; see below. |
|
463 |
// |
|
464 |
// for Emacs: (let ((c-backslash-column 120) (c-backslash-max-column 120)) (c-backslash-region (point) (point-max) nil t)) |
|
465 |
#define VM_INTRINSICS_DO(do_intrinsic, do_class, do_name, do_signature, do_alias) \ |
|
466 |
do_intrinsic(_Object_init, java_lang_Object, object_initializer_name, void_method_signature, F_R) \ |
|
467 |
/* (symbol object_initializer_name defined above) */ \ |
|
468 |
\ |
|
469 |
do_intrinsic(_hashCode, java_lang_Object, hashCode_name, void_int_signature, F_R) \ |
|
470 |
do_name( hashCode_name, "hashCode") \ |
|
471 |
do_intrinsic(_getClass, java_lang_Object, getClass_name, void_class_signature, F_R) \ |
|
472 |
do_name( getClass_name, "getClass") \ |
|
473 |
do_intrinsic(_clone, java_lang_Object, clone_name, void_object_signature, F_R) \ |
|
474 |
do_name( clone_name, "clone") \ |
|
475 |
\ |
|
476 |
/* Math & StrictMath intrinsics are defined in terms of just a few signatures: */ \ |
|
477 |
do_class(java_lang_Math, "java/lang/Math") \ |
|
478 |
do_class(java_lang_StrictMath, "java/lang/StrictMath") \ |
|
479 |
do_signature(double2_double_signature, "(DD)D") \ |
|
480 |
do_signature(int2_int_signature, "(II)I") \ |
|
481 |
\ |
|
482 |
/* here are the math names, all together: */ \ |
|
483 |
do_name(abs_name,"abs") do_name(sin_name,"sin") do_name(cos_name,"cos") \ |
|
484 |
do_name(tan_name,"tan") do_name(atan2_name,"atan2") do_name(sqrt_name,"sqrt") \ |
|
485 |
do_name(log_name,"log") do_name(log10_name,"log10") do_name(pow_name,"pow") \ |
|
486 |
do_name(exp_name,"exp") do_name(min_name,"min") do_name(max_name,"max") \ |
|
487 |
\ |
|
488 |
do_intrinsic(_dabs, java_lang_Math, abs_name, double_double_signature, F_S) \ |
|
489 |
do_intrinsic(_dsin, java_lang_Math, sin_name, double_double_signature, F_S) \ |
|
490 |
do_intrinsic(_dcos, java_lang_Math, cos_name, double_double_signature, F_S) \ |
|
491 |
do_intrinsic(_dtan, java_lang_Math, tan_name, double_double_signature, F_S) \ |
|
492 |
do_intrinsic(_datan2, java_lang_Math, atan2_name, double2_double_signature, F_S) \ |
|
493 |
do_intrinsic(_dsqrt, java_lang_Math, sqrt_name, double_double_signature, F_S) \ |
|
494 |
do_intrinsic(_dlog, java_lang_Math, log_name, double_double_signature, F_S) \ |
|
495 |
do_intrinsic(_dlog10, java_lang_Math, log10_name, double_double_signature, F_S) \ |
|
496 |
do_intrinsic(_dpow, java_lang_Math, pow_name, double2_double_signature, F_S) \ |
|
497 |
do_intrinsic(_dexp, java_lang_Math, exp_name, double_double_signature, F_S) \ |
|
498 |
do_intrinsic(_min, java_lang_Math, min_name, int2_int_signature, F_S) \ |
|
499 |
do_intrinsic(_max, java_lang_Math, max_name, int2_int_signature, F_S) \ |
|
500 |
\ |
|
501 |
do_intrinsic(_floatToRawIntBits, java_lang_Float, floatToRawIntBits_name, float_int_signature, F_S) \ |
|
502 |
do_name( floatToRawIntBits_name, "floatToRawIntBits") \ |
|
503 |
do_intrinsic(_floatToIntBits, java_lang_Float, floatToIntBits_name, float_int_signature, F_S) \ |
|
504 |
do_name( floatToIntBits_name, "floatToIntBits") \ |
|
505 |
do_intrinsic(_intBitsToFloat, java_lang_Float, intBitsToFloat_name, int_float_signature, F_S) \ |
|
506 |
do_name( intBitsToFloat_name, "intBitsToFloat") \ |
|
507 |
do_intrinsic(_doubleToRawLongBits, java_lang_Double, doubleToRawLongBits_name, double_long_signature, F_S) \ |
|
508 |
do_name( doubleToRawLongBits_name, "doubleToRawLongBits") \ |
|
509 |
do_intrinsic(_doubleToLongBits, java_lang_Double, doubleToLongBits_name, double_long_signature, F_S) \ |
|
510 |
do_name( doubleToLongBits_name, "doubleToLongBits") \ |
|
511 |
do_intrinsic(_longBitsToDouble, java_lang_Double, longBitsToDouble_name, long_double_signature, F_S) \ |
|
512 |
do_name( longBitsToDouble_name, "longBitsToDouble") \ |
|
2255
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
1890
diff
changeset
|
513 |
\ |
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
1890
diff
changeset
|
514 |
do_intrinsic(_bitCount_i, java_lang_Integer, bitCount_name, int_int_signature, F_S) \ |
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
1890
diff
changeset
|
515 |
do_intrinsic(_bitCount_l, java_lang_Long, bitCount_name, long_int_signature, F_S) \ |
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
1890
diff
changeset
|
516 |
\ |
1 | 517 |
do_intrinsic(_reverseBytes_i, java_lang_Integer, reverseBytes_name, int_int_signature, F_S) \ |
518 |
do_name( reverseBytes_name, "reverseBytes") \ |
|
519 |
do_intrinsic(_reverseBytes_l, java_lang_Long, reverseBytes_name, long_long_signature, F_S) \ |
|
520 |
/* (symbol reverseBytes_name defined above) */ \ |
|
521 |
\ |
|
522 |
do_intrinsic(_identityHashCode, java_lang_System, identityHashCode_name, object_int_signature, F_S) \ |
|
523 |
do_name( identityHashCode_name, "identityHashCode") \ |
|
524 |
do_intrinsic(_currentTimeMillis, java_lang_System, currentTimeMillis_name, void_long_signature, F_S) \ |
|
525 |
\ |
|
526 |
do_name( currentTimeMillis_name, "currentTimeMillis") \ |
|
527 |
do_intrinsic(_nanoTime, java_lang_System, nanoTime_name, void_long_signature, F_S) \ |
|
528 |
do_name( nanoTime_name, "nanoTime") \ |
|
529 |
\ |
|
530 |
do_intrinsic(_arraycopy, java_lang_System, arraycopy_name, arraycopy_signature, F_S) \ |
|
531 |
do_name( arraycopy_name, "arraycopy") \ |
|
532 |
do_signature(arraycopy_signature, "(Ljava/lang/Object;ILjava/lang/Object;II)V") \ |
|
533 |
do_intrinsic(_isInterrupted, java_lang_Thread, isInterrupted_name, isInterrupted_signature, F_R) \ |
|
534 |
do_name( isInterrupted_name, "isInterrupted") \ |
|
535 |
do_signature(isInterrupted_signature, "(Z)Z") \ |
|
536 |
do_intrinsic(_currentThread, java_lang_Thread, currentThread_name, currentThread_signature, F_S) \ |
|
537 |
do_name( currentThread_name, "currentThread") \ |
|
538 |
do_signature(currentThread_signature, "()Ljava/lang/Thread;") \ |
|
539 |
\ |
|
540 |
/* reflective intrinsics, for java/lang/Class, etc. */ \ |
|
541 |
do_intrinsic(_isAssignableFrom, java_lang_Class, isAssignableFrom_name, class_boolean_signature, F_RN) \ |
|
542 |
do_name( isAssignableFrom_name, "isAssignableFrom") \ |
|
543 |
do_intrinsic(_isInstance, java_lang_Class, isInstance_name, object_boolean_signature, F_RN) \ |
|
544 |
do_name( isInstance_name, "isInstance") \ |
|
545 |
do_intrinsic(_getModifiers, java_lang_Class, getModifiers_name, void_int_signature, F_RN) \ |
|
546 |
do_name( getModifiers_name, "getModifiers") \ |
|
547 |
do_intrinsic(_isInterface, java_lang_Class, isInterface_name, void_boolean_signature, F_RN) \ |
|
548 |
do_name( isInterface_name, "isInterface") \ |
|
549 |
do_intrinsic(_isArray, java_lang_Class, isArray_name, void_boolean_signature, F_RN) \ |
|
550 |
do_name( isArray_name, "isArray") \ |
|
551 |
do_intrinsic(_isPrimitive, java_lang_Class, isPrimitive_name, void_boolean_signature, F_RN) \ |
|
552 |
do_name( isPrimitive_name, "isPrimitive") \ |
|
553 |
do_intrinsic(_getSuperclass, java_lang_Class, getSuperclass_name, void_class_signature, F_RN) \ |
|
554 |
do_name( getSuperclass_name, "getSuperclass") \ |
|
555 |
do_intrinsic(_getComponentType, java_lang_Class, getComponentType_name, void_class_signature, F_RN) \ |
|
556 |
do_name( getComponentType_name, "getComponentType") \ |
|
557 |
\ |
|
558 |
do_intrinsic(_getClassAccessFlags, sun_reflect_Reflection, getClassAccessFlags_name, class_int_signature, F_SN) \ |
|
559 |
do_name( getClassAccessFlags_name, "getClassAccessFlags") \ |
|
560 |
do_intrinsic(_getLength, java_lang_reflect_Array, getLength_name, object_int_signature, F_SN) \ |
|
561 |
do_name( getLength_name, "getLength") \ |
|
562 |
\ |
|
563 |
do_intrinsic(_getCallerClass, sun_reflect_Reflection, getCallerClass_name, getCallerClass_signature, F_SN) \ |
|
564 |
do_name( getCallerClass_name, "getCallerClass") \ |
|
565 |
do_signature(getCallerClass_signature, "(I)Ljava/lang/Class;") \ |
|
566 |
\ |
|
567 |
do_intrinsic(_newArray, java_lang_reflect_Array, newArray_name, newArray_signature, F_SN) \ |
|
568 |
do_name( newArray_name, "newArray") \ |
|
569 |
do_signature(newArray_signature, "(Ljava/lang/Class;I)Ljava/lang/Object;") \ |
|
570 |
\ |
|
571 |
do_intrinsic(_copyOf, java_util_Arrays, copyOf_name, copyOf_signature, F_S) \ |
|
572 |
do_name( copyOf_name, "copyOf") \ |
|
573 |
do_signature(copyOf_signature, "([Ljava/lang/Object;ILjava/lang/Class;)[Ljava/lang/Object;") \ |
|
574 |
\ |
|
575 |
do_intrinsic(_copyOfRange, java_util_Arrays, copyOfRange_name, copyOfRange_signature, F_S) \ |
|
576 |
do_name( copyOfRange_name, "copyOfRange") \ |
|
577 |
do_signature(copyOfRange_signature, "([Ljava/lang/Object;IILjava/lang/Class;)[Ljava/lang/Object;") \ |
|
578 |
\ |
|
595
a2be4c89de81
6695049: (coll) Create an x86 intrinsic for Arrays.equals
rasbold
parents:
218
diff
changeset
|
579 |
do_intrinsic(_equalsC, java_util_Arrays, equals_name, equalsC_signature, F_S) \ |
a2be4c89de81
6695049: (coll) Create an x86 intrinsic for Arrays.equals
rasbold
parents:
218
diff
changeset
|
580 |
do_name( equals_name, "equals") \ |
a2be4c89de81
6695049: (coll) Create an x86 intrinsic for Arrays.equals
rasbold
parents:
218
diff
changeset
|
581 |
do_signature(equalsC_signature, "([C[C)Z") \ |
a2be4c89de81
6695049: (coll) Create an x86 intrinsic for Arrays.equals
rasbold
parents:
218
diff
changeset
|
582 |
\ |
1 | 583 |
do_intrinsic(_invoke, java_lang_reflect_Method, invoke_name, object_array_object_object_signature, F_R) \ |
584 |
/* (symbols invoke_name and invoke_signature defined above) */ \ |
|
585 |
\ |
|
586 |
do_intrinsic(_compareTo, java_lang_String, compareTo_name, string_int_signature, F_R) \ |
|
587 |
do_name( compareTo_name, "compareTo") \ |
|
588 |
do_intrinsic(_indexOf, java_lang_String, indexOf_name, string_int_signature, F_R) \ |
|
589 |
do_name( indexOf_name, "indexOf") \ |
|
590 |
\ |
|
591 |
do_class(java_nio_Buffer, "java/nio/Buffer") \ |
|
592 |
do_intrinsic(_checkIndex, java_nio_Buffer, checkIndex_name, int_int_signature, F_R) \ |
|
593 |
do_name( checkIndex_name, "checkIndex") \ |
|
594 |
\ |
|
595 |
do_class(sun_misc_AtomicLongCSImpl, "sun/misc/AtomicLongCSImpl") \ |
|
596 |
do_intrinsic(_get_AtomicLong, sun_misc_AtomicLongCSImpl, get_name, void_long_signature, F_R) \ |
|
597 |
/* (symbols get_name and void_long_signature defined above) */ \ |
|
598 |
\ |
|
599 |
do_intrinsic(_attemptUpdate, sun_misc_AtomicLongCSImpl, attemptUpdate_name, attemptUpdate_signature, F_R) \ |
|
600 |
do_name( attemptUpdate_name, "attemptUpdate") \ |
|
601 |
do_signature(attemptUpdate_signature, "(JJ)Z") \ |
|
602 |
\ |
|
218
a0e996680b05
6667615: (Escape Analysis) extend MDO to cache arguments escape state
kvn
parents:
191
diff
changeset
|
603 |
do_intrinsic(_fillInStackTrace, java_lang_Throwable, fillInStackTrace_name, void_throwable_signature, F_RNY) \ |
a0e996680b05
6667615: (Escape Analysis) extend MDO to cache arguments escape state
kvn
parents:
191
diff
changeset
|
604 |
\ |
1 | 605 |
/* support for sun.misc.Unsafe */ \ |
606 |
do_class(sun_misc_Unsafe, "sun/misc/Unsafe") \ |
|
607 |
\ |
|
608 |
do_intrinsic(_allocateInstance, sun_misc_Unsafe, allocateInstance_name, allocateInstance_signature, F_RN) \ |
|
609 |
do_name( allocateInstance_name, "allocateInstance") \ |
|
610 |
do_signature(allocateInstance_signature, "(Ljava/lang/Class;)Ljava/lang/Object;") \ |
|
611 |
do_intrinsic(_copyMemory, sun_misc_Unsafe, copyMemory_name, copyMemory_signature, F_RN) \ |
|
612 |
do_name( copyMemory_name, "copyMemory") \ |
|
613 |
do_signature(copyMemory_signature, "(Ljava/lang/Object;JLjava/lang/Object;JJ)V") \ |
|
614 |
do_intrinsic(_park, sun_misc_Unsafe, park_name, park_signature, F_RN) \ |
|
615 |
do_name( park_name, "park") \ |
|
616 |
do_signature(park_signature, "(ZJ)V") \ |
|
617 |
do_intrinsic(_unpark, sun_misc_Unsafe, unpark_name, unpark_signature, F_RN) \ |
|
618 |
do_name( unpark_name, "unpark") \ |
|
619 |
do_alias( unpark_signature, /*(LObject;)V*/ object_void_signature) \ |
|
620 |
\ |
|
621 |
/* unsafe memory references (there are a lot of them...) */ \ |
|
622 |
do_signature(getObject_signature, "(Ljava/lang/Object;J)Ljava/lang/Object;") \ |
|
623 |
do_signature(putObject_signature, "(Ljava/lang/Object;JLjava/lang/Object;)V") \ |
|
624 |
do_signature(getBoolean_signature, "(Ljava/lang/Object;J)Z") \ |
|
625 |
do_signature(putBoolean_signature, "(Ljava/lang/Object;JZ)V") \ |
|
626 |
do_signature(getByte_signature, "(Ljava/lang/Object;J)B") \ |
|
627 |
do_signature(putByte_signature, "(Ljava/lang/Object;JB)V") \ |
|
628 |
do_signature(getShort_signature, "(Ljava/lang/Object;J)S") \ |
|
629 |
do_signature(putShort_signature, "(Ljava/lang/Object;JS)V") \ |
|
630 |
do_signature(getChar_signature, "(Ljava/lang/Object;J)C") \ |
|
631 |
do_signature(putChar_signature, "(Ljava/lang/Object;JC)V") \ |
|
632 |
do_signature(getInt_signature, "(Ljava/lang/Object;J)I") \ |
|
633 |
do_signature(putInt_signature, "(Ljava/lang/Object;JI)V") \ |
|
634 |
do_signature(getLong_signature, "(Ljava/lang/Object;J)J") \ |
|
635 |
do_signature(putLong_signature, "(Ljava/lang/Object;JJ)V") \ |
|
636 |
do_signature(getFloat_signature, "(Ljava/lang/Object;J)F") \ |
|
637 |
do_signature(putFloat_signature, "(Ljava/lang/Object;JF)V") \ |
|
638 |
do_signature(getDouble_signature, "(Ljava/lang/Object;J)D") \ |
|
639 |
do_signature(putDouble_signature, "(Ljava/lang/Object;JD)V") \ |
|
640 |
\ |
|
641 |
do_name(getObject_name,"getObject") do_name(putObject_name,"putObject") \ |
|
642 |
do_name(getBoolean_name,"getBoolean") do_name(putBoolean_name,"putBoolean") \ |
|
643 |
do_name(getByte_name,"getByte") do_name(putByte_name,"putByte") \ |
|
644 |
do_name(getShort_name,"getShort") do_name(putShort_name,"putShort") \ |
|
645 |
do_name(getChar_name,"getChar") do_name(putChar_name,"putChar") \ |
|
646 |
do_name(getInt_name,"getInt") do_name(putInt_name,"putInt") \ |
|
647 |
do_name(getLong_name,"getLong") do_name(putLong_name,"putLong") \ |
|
648 |
do_name(getFloat_name,"getFloat") do_name(putFloat_name,"putFloat") \ |
|
649 |
do_name(getDouble_name,"getDouble") do_name(putDouble_name,"putDouble") \ |
|
650 |
\ |
|
651 |
do_intrinsic(_getObject, sun_misc_Unsafe, getObject_name, getObject_signature, F_RN) \ |
|
652 |
do_intrinsic(_getBoolean, sun_misc_Unsafe, getBoolean_name, getBoolean_signature, F_RN) \ |
|
653 |
do_intrinsic(_getByte, sun_misc_Unsafe, getByte_name, getByte_signature, F_RN) \ |
|
654 |
do_intrinsic(_getShort, sun_misc_Unsafe, getShort_name, getShort_signature, F_RN) \ |
|
655 |
do_intrinsic(_getChar, sun_misc_Unsafe, getChar_name, getChar_signature, F_RN) \ |
|
656 |
do_intrinsic(_getInt, sun_misc_Unsafe, getInt_name, getInt_signature, F_RN) \ |
|
657 |
do_intrinsic(_getLong, sun_misc_Unsafe, getLong_name, getLong_signature, F_RN) \ |
|
658 |
do_intrinsic(_getFloat, sun_misc_Unsafe, getFloat_name, getFloat_signature, F_RN) \ |
|
659 |
do_intrinsic(_getDouble, sun_misc_Unsafe, getDouble_name, getDouble_signature, F_RN) \ |
|
660 |
do_intrinsic(_putObject, sun_misc_Unsafe, putObject_name, putObject_signature, F_RN) \ |
|
661 |
do_intrinsic(_putBoolean, sun_misc_Unsafe, putBoolean_name, putBoolean_signature, F_RN) \ |
|
662 |
do_intrinsic(_putByte, sun_misc_Unsafe, putByte_name, putByte_signature, F_RN) \ |
|
663 |
do_intrinsic(_putShort, sun_misc_Unsafe, putShort_name, putShort_signature, F_RN) \ |
|
664 |
do_intrinsic(_putChar, sun_misc_Unsafe, putChar_name, putChar_signature, F_RN) \ |
|
665 |
do_intrinsic(_putInt, sun_misc_Unsafe, putInt_name, putInt_signature, F_RN) \ |
|
666 |
do_intrinsic(_putLong, sun_misc_Unsafe, putLong_name, putLong_signature, F_RN) \ |
|
667 |
do_intrinsic(_putFloat, sun_misc_Unsafe, putFloat_name, putFloat_signature, F_RN) \ |
|
668 |
do_intrinsic(_putDouble, sun_misc_Unsafe, putDouble_name, putDouble_signature, F_RN) \ |
|
669 |
\ |
|
670 |
do_name(getObjectVolatile_name,"getObjectVolatile") do_name(putObjectVolatile_name,"putObjectVolatile") \ |
|
671 |
do_name(getBooleanVolatile_name,"getBooleanVolatile") do_name(putBooleanVolatile_name,"putBooleanVolatile") \ |
|
672 |
do_name(getByteVolatile_name,"getByteVolatile") do_name(putByteVolatile_name,"putByteVolatile") \ |
|
673 |
do_name(getShortVolatile_name,"getShortVolatile") do_name(putShortVolatile_name,"putShortVolatile") \ |
|
674 |
do_name(getCharVolatile_name,"getCharVolatile") do_name(putCharVolatile_name,"putCharVolatile") \ |
|
675 |
do_name(getIntVolatile_name,"getIntVolatile") do_name(putIntVolatile_name,"putIntVolatile") \ |
|
676 |
do_name(getLongVolatile_name,"getLongVolatile") do_name(putLongVolatile_name,"putLongVolatile") \ |
|
677 |
do_name(getFloatVolatile_name,"getFloatVolatile") do_name(putFloatVolatile_name,"putFloatVolatile") \ |
|
678 |
do_name(getDoubleVolatile_name,"getDoubleVolatile") do_name(putDoubleVolatile_name,"putDoubleVolatile") \ |
|
679 |
\ |
|
680 |
do_intrinsic(_getObjectVolatile, sun_misc_Unsafe, getObjectVolatile_name, getObject_signature, F_RN) \ |
|
681 |
do_intrinsic(_getBooleanVolatile, sun_misc_Unsafe, getBooleanVolatile_name, getBoolean_signature, F_RN) \ |
|
682 |
do_intrinsic(_getByteVolatile, sun_misc_Unsafe, getByteVolatile_name, getByte_signature, F_RN) \ |
|
683 |
do_intrinsic(_getShortVolatile, sun_misc_Unsafe, getShortVolatile_name, getShort_signature, F_RN) \ |
|
684 |
do_intrinsic(_getCharVolatile, sun_misc_Unsafe, getCharVolatile_name, getChar_signature, F_RN) \ |
|
685 |
do_intrinsic(_getIntVolatile, sun_misc_Unsafe, getIntVolatile_name, getInt_signature, F_RN) \ |
|
686 |
do_intrinsic(_getLongVolatile, sun_misc_Unsafe, getLongVolatile_name, getLong_signature, F_RN) \ |
|
687 |
do_intrinsic(_getFloatVolatile, sun_misc_Unsafe, getFloatVolatile_name, getFloat_signature, F_RN) \ |
|
688 |
do_intrinsic(_getDoubleVolatile, sun_misc_Unsafe, getDoubleVolatile_name, getDouble_signature, F_RN) \ |
|
689 |
do_intrinsic(_putObjectVolatile, sun_misc_Unsafe, putObjectVolatile_name, putObject_signature, F_RN) \ |
|
690 |
do_intrinsic(_putBooleanVolatile, sun_misc_Unsafe, putBooleanVolatile_name, putBoolean_signature, F_RN) \ |
|
691 |
do_intrinsic(_putByteVolatile, sun_misc_Unsafe, putByteVolatile_name, putByte_signature, F_RN) \ |
|
692 |
do_intrinsic(_putShortVolatile, sun_misc_Unsafe, putShortVolatile_name, putShort_signature, F_RN) \ |
|
693 |
do_intrinsic(_putCharVolatile, sun_misc_Unsafe, putCharVolatile_name, putChar_signature, F_RN) \ |
|
694 |
do_intrinsic(_putIntVolatile, sun_misc_Unsafe, putIntVolatile_name, putInt_signature, F_RN) \ |
|
695 |
do_intrinsic(_putLongVolatile, sun_misc_Unsafe, putLongVolatile_name, putLong_signature, F_RN) \ |
|
696 |
do_intrinsic(_putFloatVolatile, sun_misc_Unsafe, putFloatVolatile_name, putFloat_signature, F_RN) \ |
|
697 |
do_intrinsic(_putDoubleVolatile, sun_misc_Unsafe, putDoubleVolatile_name, putDouble_signature, F_RN) \ |
|
698 |
\ |
|
699 |
/* %%% these are redundant except perhaps for getAddress, but Unsafe has native methods for them */ \ |
|
700 |
do_signature(getByte_raw_signature, "(J)B") \ |
|
701 |
do_signature(putByte_raw_signature, "(JB)V") \ |
|
702 |
do_signature(getShort_raw_signature, "(J)S") \ |
|
703 |
do_signature(putShort_raw_signature, "(JS)V") \ |
|
704 |
do_signature(getChar_raw_signature, "(J)C") \ |
|
705 |
do_signature(putChar_raw_signature, "(JC)V") \ |
|
706 |
do_signature(putInt_raw_signature, "(JI)V") \ |
|
707 |
do_alias(getLong_raw_signature, /*(J)J*/ long_long_signature) \ |
|
708 |
do_alias(putLong_raw_signature, /*(JJ)V*/ long_long_void_signature) \ |
|
709 |
do_signature(getFloat_raw_signature, "(J)F") \ |
|
710 |
do_signature(putFloat_raw_signature, "(JF)V") \ |
|
711 |
do_alias(getDouble_raw_signature, /*(J)D*/ long_double_signature) \ |
|
712 |
do_signature(putDouble_raw_signature, "(JD)V") \ |
|
713 |
do_alias(getAddress_raw_signature, /*(J)J*/ long_long_signature) \ |
|
714 |
do_alias(putAddress_raw_signature, /*(JJ)V*/ long_long_void_signature) \ |
|
715 |
\ |
|
716 |
do_name( getAddress_name, "getAddress") \ |
|
717 |
do_name( putAddress_name, "putAddress") \ |
|
718 |
\ |
|
719 |
do_intrinsic(_getByte_raw, sun_misc_Unsafe, getByte_name, getByte_raw_signature, F_RN) \ |
|
720 |
do_intrinsic(_getShort_raw, sun_misc_Unsafe, getShort_name, getShort_raw_signature, F_RN) \ |
|
721 |
do_intrinsic(_getChar_raw, sun_misc_Unsafe, getChar_name, getChar_raw_signature, F_RN) \ |
|
2255
54abdf3e1055
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
1890
diff
changeset
|
722 |
do_intrinsic(_getInt_raw, sun_misc_Unsafe, getInt_name, long_int_signature, F_RN) \ |
1 | 723 |
do_intrinsic(_getLong_raw, sun_misc_Unsafe, getLong_name, getLong_raw_signature, F_RN) \ |
724 |
do_intrinsic(_getFloat_raw, sun_misc_Unsafe, getFloat_name, getFloat_raw_signature, F_RN) \ |
|
725 |
do_intrinsic(_getDouble_raw, sun_misc_Unsafe, getDouble_name, getDouble_raw_signature, F_RN) \ |
|
726 |
do_intrinsic(_getAddress_raw, sun_misc_Unsafe, getAddress_name, getAddress_raw_signature, F_RN) \ |
|
727 |
do_intrinsic(_putByte_raw, sun_misc_Unsafe, putByte_name, putByte_raw_signature, F_RN) \ |
|
728 |
do_intrinsic(_putShort_raw, sun_misc_Unsafe, putShort_name, putShort_raw_signature, F_RN) \ |
|
729 |
do_intrinsic(_putChar_raw, sun_misc_Unsafe, putChar_name, putChar_raw_signature, F_RN) \ |
|
730 |
do_intrinsic(_putInt_raw, sun_misc_Unsafe, putInt_name, putInt_raw_signature, F_RN) \ |
|
731 |
do_intrinsic(_putLong_raw, sun_misc_Unsafe, putLong_name, putLong_raw_signature, F_RN) \ |
|
732 |
do_intrinsic(_putFloat_raw, sun_misc_Unsafe, putFloat_name, putFloat_raw_signature, F_RN) \ |
|
733 |
do_intrinsic(_putDouble_raw, sun_misc_Unsafe, putDouble_name, putDouble_raw_signature, F_RN) \ |
|
734 |
do_intrinsic(_putAddress_raw, sun_misc_Unsafe, putAddress_name, putAddress_raw_signature, F_RN) \ |
|
735 |
\ |
|
736 |
do_intrinsic(_compareAndSwapObject, sun_misc_Unsafe, compareAndSwapObject_name, compareAndSwapObject_signature, F_RN) \ |
|
737 |
do_name( compareAndSwapObject_name, "compareAndSwapObject") \ |
|
738 |
do_signature(compareAndSwapObject_signature, "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z") \ |
|
739 |
do_intrinsic(_compareAndSwapLong, sun_misc_Unsafe, compareAndSwapLong_name, compareAndSwapLong_signature, F_RN) \ |
|
740 |
do_name( compareAndSwapLong_name, "compareAndSwapLong") \ |
|
741 |
do_signature(compareAndSwapLong_signature, "(Ljava/lang/Object;JJJ)Z") \ |
|
742 |
do_intrinsic(_compareAndSwapInt, sun_misc_Unsafe, compareAndSwapInt_name, compareAndSwapInt_signature, F_RN) \ |
|
743 |
do_name( compareAndSwapInt_name, "compareAndSwapInt") \ |
|
744 |
do_signature(compareAndSwapInt_signature, "(Ljava/lang/Object;JII)Z") \ |
|
745 |
do_intrinsic(_putOrderedObject, sun_misc_Unsafe, putOrderedObject_name, putOrderedObject_signature, F_RN) \ |
|
746 |
do_name( putOrderedObject_name, "putOrderedObject") \ |
|
747 |
do_alias( putOrderedObject_signature, /*(LObject;JLObject;)V*/ putObject_signature) \ |
|
748 |
do_intrinsic(_putOrderedLong, sun_misc_Unsafe, putOrderedLong_name, putOrderedLong_signature, F_RN) \ |
|
749 |
do_name( putOrderedLong_name, "putOrderedLong") \ |
|
750 |
do_alias( putOrderedLong_signature, /*(Ljava/lang/Object;JJ)V*/ putLong_signature) \ |
|
751 |
do_intrinsic(_putOrderedInt, sun_misc_Unsafe, putOrderedInt_name, putOrderedInt_signature, F_RN) \ |
|
752 |
do_name( putOrderedInt_name, "putOrderedInt") \ |
|
753 |
do_alias( putOrderedInt_signature, /*(Ljava/lang/Object;JI)V*/ putInt_signature) \ |
|
754 |
\ |
|
755 |
/* prefetch_signature is shared by all prefetch variants */ \ |
|
756 |
do_signature( prefetch_signature, "(Ljava/lang/Object;J)V") \ |
|
757 |
\ |
|
758 |
do_intrinsic(_prefetchRead, sun_misc_Unsafe, prefetchRead_name, prefetch_signature, F_RN) \ |
|
759 |
do_name( prefetchRead_name, "prefetchRead") \ |
|
760 |
do_intrinsic(_prefetchWrite, sun_misc_Unsafe, prefetchWrite_name, prefetch_signature, F_RN) \ |
|
761 |
do_name( prefetchWrite_name, "prefetchWrite") \ |
|
762 |
do_intrinsic(_prefetchReadStatic, sun_misc_Unsafe, prefetchReadStatic_name, prefetch_signature, F_SN) \ |
|
763 |
do_name( prefetchReadStatic_name, "prefetchReadStatic") \ |
|
764 |
do_intrinsic(_prefetchWriteStatic, sun_misc_Unsafe, prefetchWriteStatic_name, prefetch_signature, F_SN) \ |
|
765 |
do_name( prefetchWriteStatic_name, "prefetchWriteStatic") \ |
|
766 |
/*end*/ |
|
767 |
||
768 |
||
769 |
||
770 |
// Class vmSymbols |
|
771 |
||
772 |
class vmSymbols: AllStatic { |
|
773 |
friend class vmSymbolHandles; |
|
774 |
friend class vmIntrinsics; |
|
775 |
public: |
|
776 |
// enum for figuring positions and size of array holding symbolOops |
|
777 |
enum SID { |
|
778 |
NO_SID = 0, |
|
779 |
||
780 |
#define VM_SYMBOL_ENUM(name, string) VM_SYMBOL_ENUM_NAME(name), |
|
781 |
VM_SYMBOLS_DO(VM_SYMBOL_ENUM, VM_ALIAS_IGNORE) |
|
782 |
#undef VM_SYMBOL_ENUM |
|
783 |
||
784 |
SID_LIMIT, |
|
785 |
||
786 |
#define VM_ALIAS_ENUM(name, def) VM_SYMBOL_ENUM_NAME(name) = VM_SYMBOL_ENUM_NAME(def), |
|
787 |
VM_SYMBOLS_DO(VM_SYMBOL_IGNORE, VM_ALIAS_ENUM) |
|
788 |
#undef VM_ALIAS_ENUM |
|
789 |
||
790 |
FIRST_SID = NO_SID + 1 |
|
791 |
}; |
|
792 |
enum { |
|
793 |
log2_SID_LIMIT = 10 // checked by an assert at start-up |
|
794 |
}; |
|
795 |
||
796 |
private: |
|
797 |
// The symbol array |
|
798 |
static symbolOop _symbols[]; |
|
799 |
||
800 |
// Field signatures indexed by BasicType. |
|
801 |
static symbolOop _type_signatures[T_VOID+1]; |
|
802 |
||
803 |
public: |
|
804 |
// Initialization |
|
805 |
static void initialize(TRAPS); |
|
806 |
// Accessing |
|
807 |
#define VM_SYMBOL_DECLARE(name, ignore) \ |
|
808 |
static symbolOop name() { return _symbols[VM_SYMBOL_ENUM_NAME(name)]; } |
|
809 |
VM_SYMBOLS_DO(VM_SYMBOL_DECLARE, VM_SYMBOL_DECLARE) |
|
810 |
#undef VM_SYMBOL_DECLARE |
|
811 |
||
812 |
// GC support |
|
813 |
static void oops_do(OopClosure* f, bool do_all = false); |
|
814 |
||
815 |
static symbolOop type_signature(BasicType t) { |
|
816 |
assert((uint)t < T_VOID+1, "range check"); |
|
817 |
assert(_type_signatures[t] != NULL, "domain check"); |
|
818 |
return _type_signatures[t]; |
|
819 |
} |
|
820 |
// inverse of type_signature; returns T_OBJECT if s is not recognized |
|
821 |
static BasicType signature_type(symbolOop s); |
|
822 |
||
823 |
static symbolOop symbol_at(SID id) { |
|
824 |
assert(id >= FIRST_SID && id < SID_LIMIT, "oob"); |
|
825 |
assert(_symbols[id] != NULL, "init"); |
|
826 |
return _symbols[id]; |
|
827 |
} |
|
828 |
||
829 |
// Returns symbol's SID if one is assigned, else NO_SID. |
|
830 |
static SID find_sid(symbolOop symbol); |
|
831 |
||
832 |
#ifndef PRODUCT |
|
833 |
// No need for this in the product: |
|
834 |
static const char* name_for(SID sid); |
|
835 |
#endif //PRODUCT |
|
836 |
}; |
|
837 |
||
838 |
||
839 |
// Class vmSymbolHandles |
|
840 |
||
841 |
class vmSymbolHandles: AllStatic { |
|
842 |
friend class vmIntrinsics; |
|
843 |
friend class ciObjectFactory; |
|
844 |
||
845 |
public: |
|
846 |
// Accessing |
|
847 |
#define VM_SYMBOL_HANDLE_DECLARE(name, ignore) \ |
|
848 |
static symbolHandle name() { return symbol_handle_at(vmSymbols::VM_SYMBOL_ENUM_NAME(name)); } |
|
849 |
VM_SYMBOLS_DO(VM_SYMBOL_HANDLE_DECLARE, VM_SYMBOL_HANDLE_DECLARE) |
|
850 |
#undef VM_SYMBOL_HANDLE_DECLARE |
|
851 |
||
852 |
static symbolHandle symbol_handle_at(vmSymbols::SID id) { |
|
853 |
return symbolHandle(&vmSymbols::_symbols[(int)id], false); |
|
854 |
} |
|
855 |
||
856 |
static symbolHandle type_signature(BasicType t) { |
|
857 |
assert(vmSymbols::type_signature(t) != NULL, "domain check"); |
|
858 |
return symbolHandle(&vmSymbols::_type_signatures[t], false); |
|
859 |
} |
|
860 |
// inverse of type_signature; returns T_OBJECT if s is not recognized |
|
861 |
static BasicType signature_type(symbolHandle s) { |
|
862 |
return vmSymbols::signature_type(s()); |
|
863 |
} |
|
864 |
}; |
|
865 |
||
866 |
// VM Intrinsic ID's uniquely identify some very special methods |
|
867 |
class vmIntrinsics: AllStatic { |
|
868 |
friend class vmSymbols; |
|
869 |
friend class ciObjectFactory; |
|
870 |
||
871 |
public: |
|
872 |
// Accessing |
|
873 |
enum ID { |
|
874 |
_none = 0, // not an intrinsic (default answer) |
|
875 |
||
876 |
#define VM_INTRINSIC_ENUM(id, klass, name, sig, flags) id, |
|
877 |
VM_INTRINSICS_DO(VM_INTRINSIC_ENUM, |
|
878 |
VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) |
|
879 |
#undef VM_INTRINSIC_ENUM |
|
880 |
||
881 |
ID_LIMIT, |
|
882 |
FIRST_ID = _none + 1 |
|
883 |
}; |
|
884 |
||
885 |
enum Flags { |
|
886 |
// AccessFlags syndromes relevant to intrinsics. |
|
887 |
F_none = 0, |
|
888 |
F_R, // !static !synchronized (R="regular") |
|
889 |
F_S, // static !synchronized |
|
890 |
F_RN, // !static native !synchronized |
|
218
a0e996680b05
6667615: (Escape Analysis) extend MDO to cache arguments escape state
kvn
parents:
191
diff
changeset
|
891 |
F_SN, // static native !synchronized |
a0e996680b05
6667615: (Escape Analysis) extend MDO to cache arguments escape state
kvn
parents:
191
diff
changeset
|
892 |
F_RNY // !static native synchronized |
1 | 893 |
}; |
894 |
||
895 |
public: |
|
896 |
static ID ID_from(int raw_id) { |
|
897 |
assert(raw_id >= (int)_none && raw_id < (int)ID_LIMIT, |
|
898 |
"must be a valid intrinsic ID"); |
|
899 |
return (ID)raw_id; |
|
900 |
} |
|
901 |
||
902 |
static const char* name_at(ID id); |
|
903 |
||
904 |
// Given a method's class, name, signature, and access flags, report its ID. |
|
905 |
static ID find_id(vmSymbols::SID holder, |
|
906 |
vmSymbols::SID name, |
|
907 |
vmSymbols::SID sig, |
|
908 |
jshort flags); |
|
909 |
||
910 |
static void verify_method(ID actual_id, methodOop m) PRODUCT_RETURN; |
|
911 |
||
912 |
// No need for these in the product: |
|
913 |
static vmSymbols::SID class_for(ID id); |
|
914 |
static vmSymbols::SID name_for(ID id); |
|
915 |
static vmSymbols::SID signature_for(ID id); |
|
916 |
static Flags flags_for(ID id); |
|
917 |
||
918 |
static const char* short_name_as_C_string(ID id, char* buf, int size); |
|
919 |
}; |