2428 assert(mtform->klass() == SystemDictionary::MethodTypeForm_klass(), "MTForm only"); |
2428 assert(mtform->klass() == SystemDictionary::MethodTypeForm_klass(), "MTForm only"); |
2429 return mtform->obj_field(_erasedType_offset); |
2429 return mtform->obj_field(_erasedType_offset); |
2430 } |
2430 } |
2431 |
2431 |
2432 |
2432 |
2433 // Support for sun_dyn_CallSiteImpl |
2433 // Support for java_dyn_CallSite |
2434 |
2434 |
2435 int sun_dyn_CallSiteImpl::_type_offset; |
2435 int java_dyn_CallSite::_type_offset; |
2436 int sun_dyn_CallSiteImpl::_target_offset; |
2436 int java_dyn_CallSite::_target_offset; |
2437 int sun_dyn_CallSiteImpl::_vmmethod_offset; |
2437 int java_dyn_CallSite::_vmmethod_offset; |
2438 |
2438 |
2439 void sun_dyn_CallSiteImpl::compute_offsets() { |
2439 void java_dyn_CallSite::compute_offsets() { |
2440 if (!EnableInvokeDynamic) return; |
2440 if (!EnableInvokeDynamic) return; |
2441 klassOop k = SystemDictionary::CallSiteImpl_klass(); |
2441 klassOop k = SystemDictionary::CallSite_klass(); |
2442 if (k != NULL) { |
2442 if (k != NULL) { |
2443 compute_offset(_type_offset, k, vmSymbols::type_name(), vmSymbols::java_dyn_MethodType_signature(), true); |
2443 compute_offset(_type_offset, k, vmSymbols::type_name(), vmSymbols::java_dyn_MethodType_signature(), true); |
2444 compute_offset(_target_offset, k, vmSymbols::target_name(), vmSymbols::java_dyn_MethodHandle_signature(), true); |
2444 compute_offset(_target_offset, k, vmSymbols::target_name(), vmSymbols::java_dyn_MethodHandle_signature(), true); |
2445 compute_offset(_vmmethod_offset, k, vmSymbols::vmmethod_name(), vmSymbols::object_signature(), true); |
2445 compute_offset(_vmmethod_offset, k, vmSymbols::vmmethod_name(), vmSymbols::object_signature(), true); |
2446 } |
2446 } |
2447 } |
2447 } |
2448 |
2448 |
2449 oop sun_dyn_CallSiteImpl::type(oop site) { |
2449 oop java_dyn_CallSite::type(oop site) { |
2450 return site->obj_field(_type_offset); |
2450 return site->obj_field(_type_offset); |
2451 } |
2451 } |
2452 |
2452 |
2453 oop sun_dyn_CallSiteImpl::target(oop site) { |
2453 oop java_dyn_CallSite::target(oop site) { |
2454 return site->obj_field(_target_offset); |
2454 return site->obj_field(_target_offset); |
2455 } |
2455 } |
2456 |
2456 |
2457 void sun_dyn_CallSiteImpl::set_target(oop site, oop target) { |
2457 void java_dyn_CallSite::set_target(oop site, oop target) { |
2458 site->obj_field_put(_target_offset, target); |
2458 site->obj_field_put(_target_offset, target); |
2459 } |
2459 } |
2460 |
2460 |
2461 oop sun_dyn_CallSiteImpl::vmmethod(oop site) { |
2461 oop java_dyn_CallSite::vmmethod(oop site) { |
2462 return site->obj_field(_vmmethod_offset); |
2462 return site->obj_field(_vmmethod_offset); |
2463 } |
2463 } |
2464 |
2464 |
2465 void sun_dyn_CallSiteImpl::set_vmmethod(oop site, oop ref) { |
2465 void java_dyn_CallSite::set_vmmethod(oop site, oop ref) { |
2466 site->obj_field_put(_vmmethod_offset, ref); |
2466 site->obj_field_put(_vmmethod_offset, ref); |
2467 } |
2467 } |
2468 |
2468 |
2469 |
2469 |
2470 // Support for java_security_AccessControlContext |
2470 // Support for java_security_AccessControlContext |
2809 sun_dyn_AdapterMethodHandle::compute_offsets(); |
2809 sun_dyn_AdapterMethodHandle::compute_offsets(); |
2810 java_dyn_MethodType::compute_offsets(); |
2810 java_dyn_MethodType::compute_offsets(); |
2811 java_dyn_MethodTypeForm::compute_offsets(); |
2811 java_dyn_MethodTypeForm::compute_offsets(); |
2812 } |
2812 } |
2813 if (EnableInvokeDynamic) { |
2813 if (EnableInvokeDynamic) { |
2814 sun_dyn_CallSiteImpl::compute_offsets(); |
2814 java_dyn_CallSite::compute_offsets(); |
2815 } |
2815 } |
2816 java_security_AccessControlContext::compute_offsets(); |
2816 java_security_AccessControlContext::compute_offsets(); |
2817 // Initialize reflection classes. The layouts of these classes |
2817 // Initialize reflection classes. The layouts of these classes |
2818 // changed with the new reflection implementation in JDK 1.4, and |
2818 // changed with the new reflection implementation in JDK 1.4, and |
2819 // since the Universe doesn't know what JDK version it is until this |
2819 // since the Universe doesn't know what JDK version it is until this |