Mercurial > hg > graal-compiler
comparison src/share/vm/classfile/javaClasses.cpp @ 3905:c26de9aef2ed
7071307: MethodHandle bimorphic inlining should consider the frequency
Reviewed-by: twisti, roland, kvn, iveresov
author | never |
---|---|
date | Fri, 02 Sep 2011 20:58:21 -0700 |
parents | a32de5085326 |
children | f94227b6117b b0efc7ee3b31 |
comparison
equal
deleted
inserted
replaced
3902:11a4af030e4b | 3905:c26de9aef2ed |
---|---|
2322 int java_lang_invoke_BoundMethodHandle::_argument_offset; | 2322 int java_lang_invoke_BoundMethodHandle::_argument_offset; |
2323 int java_lang_invoke_BoundMethodHandle::_vmargslot_offset; | 2323 int java_lang_invoke_BoundMethodHandle::_vmargslot_offset; |
2324 | 2324 |
2325 int java_lang_invoke_AdapterMethodHandle::_conversion_offset; | 2325 int java_lang_invoke_AdapterMethodHandle::_conversion_offset; |
2326 | 2326 |
2327 int java_lang_invoke_CountingMethodHandle::_vmcount_offset; | |
2328 | |
2327 void java_lang_invoke_MethodHandle::compute_offsets() { | 2329 void java_lang_invoke_MethodHandle::compute_offsets() { |
2328 klassOop k = SystemDictionary::MethodHandle_klass(); | 2330 klassOop k = SystemDictionary::MethodHandle_klass(); |
2329 if (k != NULL && EnableInvokeDynamic) { | 2331 if (k != NULL && EnableInvokeDynamic) { |
2330 bool allow_super = false; | 2332 bool allow_super = false; |
2331 compute_offset(_type_offset, k, vmSymbols::type_name(), vmSymbols::java_lang_invoke_MethodType_signature(), allow_super); | 2333 compute_offset(_type_offset, k, vmSymbols::type_name(), vmSymbols::java_lang_invoke_MethodType_signature(), allow_super); |
2368 void java_lang_invoke_AdapterMethodHandle::compute_offsets() { | 2370 void java_lang_invoke_AdapterMethodHandle::compute_offsets() { |
2369 klassOop k = SystemDictionary::AdapterMethodHandle_klass(); | 2371 klassOop k = SystemDictionary::AdapterMethodHandle_klass(); |
2370 if (k != NULL && EnableInvokeDynamic) { | 2372 if (k != NULL && EnableInvokeDynamic) { |
2371 compute_offset(_conversion_offset, k, vmSymbols::conversion_name(), vmSymbols::int_signature(), true); | 2373 compute_offset(_conversion_offset, k, vmSymbols::conversion_name(), vmSymbols::int_signature(), true); |
2372 } | 2374 } |
2375 } | |
2376 | |
2377 void java_lang_invoke_CountingMethodHandle::compute_offsets() { | |
2378 klassOop k = SystemDictionary::CountingMethodHandle_klass(); | |
2379 if (k != NULL && EnableInvokeDynamic) { | |
2380 compute_offset(_vmcount_offset, k, vmSymbols::vmcount_name(), vmSymbols::int_signature(), true); | |
2381 } | |
2382 } | |
2383 | |
2384 int java_lang_invoke_CountingMethodHandle::vmcount(oop mh) { | |
2385 assert(is_instance(mh), "CMH only"); | |
2386 return mh->int_field(_vmcount_offset); | |
2387 } | |
2388 | |
2389 void java_lang_invoke_CountingMethodHandle::set_vmcount(oop mh, int count) { | |
2390 assert(is_instance(mh), "CMH only"); | |
2391 mh->int_field_put(_vmcount_offset, count); | |
2373 } | 2392 } |
2374 | 2393 |
2375 oop java_lang_invoke_MethodHandle::type(oop mh) { | 2394 oop java_lang_invoke_MethodHandle::type(oop mh) { |
2376 return mh->obj_field(_type_offset); | 2395 return mh->obj_field(_type_offset); |
2377 } | 2396 } |
3041 java_lang_invoke_BoundMethodHandle::compute_offsets(); | 3060 java_lang_invoke_BoundMethodHandle::compute_offsets(); |
3042 java_lang_invoke_AdapterMethodHandle::compute_offsets(); | 3061 java_lang_invoke_AdapterMethodHandle::compute_offsets(); |
3043 java_lang_invoke_MethodType::compute_offsets(); | 3062 java_lang_invoke_MethodType::compute_offsets(); |
3044 java_lang_invoke_MethodTypeForm::compute_offsets(); | 3063 java_lang_invoke_MethodTypeForm::compute_offsets(); |
3045 java_lang_invoke_CallSite::compute_offsets(); | 3064 java_lang_invoke_CallSite::compute_offsets(); |
3065 java_lang_invoke_CountingMethodHandle::compute_offsets(); | |
3046 } | 3066 } |
3047 java_security_AccessControlContext::compute_offsets(); | 3067 java_security_AccessControlContext::compute_offsets(); |
3048 // Initialize reflection classes. The layouts of these classes | 3068 // Initialize reflection classes. The layouts of these classes |
3049 // changed with the new reflection implementation in JDK 1.4, and | 3069 // changed with the new reflection implementation in JDK 1.4, and |
3050 // since the Universe doesn't know what JDK version it is until this | 3070 // since the Universe doesn't know what JDK version it is until this |