Mercurial > hg > graal-compiler
diff src/cpu/x86/vm/methodHandles_x86.cpp @ 2357:8033953d67ff
7012648: move JSR 292 to package java.lang.invoke and adjust names
Summary: package and class renaming only; delete unused methods and classes
Reviewed-by: twisti
author | jrose |
---|---|
date | Fri, 11 Mar 2011 22:34:57 -0800 |
parents | 1b4e6a5d98e0 |
children | 2e038ad0c1d0 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/methodHandles_x86.cpp Fri Mar 11 22:33:47 2011 -0800 +++ b/src/cpu/x86/vm/methodHandles_x86.cpp Fri Mar 11 22:34:57 2011 -0800 @@ -125,9 +125,9 @@ } // given the MethodType, find out where the MH argument is buried - __ load_heap_oop(rdx_temp, Address(rax_mtype, __ delayed_value(java_dyn_MethodType::form_offset_in_bytes, rdi_temp))); + __ load_heap_oop(rdx_temp, Address(rax_mtype, __ delayed_value(java_lang_invoke_MethodType::form_offset_in_bytes, rdi_temp))); Register rdx_vmslots = rdx_temp; - __ movl(rdx_vmslots, Address(rdx_temp, __ delayed_value(java_dyn_MethodTypeForm::vmslots_offset_in_bytes, rdi_temp))); + __ movl(rdx_vmslots, Address(rdx_temp, __ delayed_value(java_lang_invoke_MethodTypeForm::vmslots_offset_in_bytes, rdi_temp))); __ movptr(rcx_recv, __ argument_address(rdx_vmslots)); trace_method_handle(_masm, "invokeExact"); @@ -154,11 +154,11 @@ rcx_argslot, rbx_temp, rdx_temp); // load up an adapter from the calling type (Java weaves this) - __ load_heap_oop(rdx_temp, Address(rax_mtype, __ delayed_value(java_dyn_MethodType::form_offset_in_bytes, rdi_temp))); + __ load_heap_oop(rdx_temp, Address(rax_mtype, __ delayed_value(java_lang_invoke_MethodType::form_offset_in_bytes, rdi_temp))); Register rdx_adapter = rdx_temp; - // __ load_heap_oop(rdx_adapter, Address(rdx_temp, java_dyn_MethodTypeForm::genericInvoker_offset_in_bytes())); + // __ load_heap_oop(rdx_adapter, Address(rdx_temp, java_lang_invoke_MethodTypeForm::genericInvoker_offset_in_bytes())); // deal with old JDK versions: - __ lea(rdi_temp, Address(rdx_temp, __ delayed_value(java_dyn_MethodTypeForm::genericInvoker_offset_in_bytes, rdi_temp))); + __ lea(rdi_temp, Address(rdx_temp, __ delayed_value(java_lang_invoke_MethodTypeForm::genericInvoker_offset_in_bytes, rdi_temp))); __ cmpptr(rdi_temp, rdx_temp); Label sorry_no_invoke_generic; __ jcc(Assembler::below, sorry_no_invoke_generic); @@ -371,16 +371,16 @@ // which conversion op types are implemented here? int MethodHandles::adapter_conversion_ops_supported_mask() { - return ((1<<sun_dyn_AdapterMethodHandle::OP_RETYPE_ONLY) - |(1<<sun_dyn_AdapterMethodHandle::OP_RETYPE_RAW) - |(1<<sun_dyn_AdapterMethodHandle::OP_CHECK_CAST) - |(1<<sun_dyn_AdapterMethodHandle::OP_PRIM_TO_PRIM) - |(1<<sun_dyn_AdapterMethodHandle::OP_REF_TO_PRIM) - |(1<<sun_dyn_AdapterMethodHandle::OP_SWAP_ARGS) - |(1<<sun_dyn_AdapterMethodHandle::OP_ROT_ARGS) - |(1<<sun_dyn_AdapterMethodHandle::OP_DUP_ARGS) - |(1<<sun_dyn_AdapterMethodHandle::OP_DROP_ARGS) - //|(1<<sun_dyn_AdapterMethodHandle::OP_SPREAD_ARGS) //BUG! + return ((1<<java_lang_invoke_AdapterMethodHandle::OP_RETYPE_ONLY) + |(1<<java_lang_invoke_AdapterMethodHandle::OP_RETYPE_RAW) + |(1<<java_lang_invoke_AdapterMethodHandle::OP_CHECK_CAST) + |(1<<java_lang_invoke_AdapterMethodHandle::OP_PRIM_TO_PRIM) + |(1<<java_lang_invoke_AdapterMethodHandle::OP_REF_TO_PRIM) + |(1<<java_lang_invoke_AdapterMethodHandle::OP_SWAP_ARGS) + |(1<<java_lang_invoke_AdapterMethodHandle::OP_ROT_ARGS) + |(1<<java_lang_invoke_AdapterMethodHandle::OP_DUP_ARGS) + |(1<<java_lang_invoke_AdapterMethodHandle::OP_DROP_ARGS) + //|(1<<java_lang_invoke_AdapterMethodHandle::OP_SPREAD_ARGS) //BUG! ); // FIXME: MethodHandlesTest gets a crash if we enable OP_SPREAD_ARGS. } @@ -415,21 +415,21 @@ const Register rarg2_required = LP64_ONLY(j_rarg2) NOT_LP64(rdi); assert_different_registers(rarg0_code, rarg1_actual, rarg2_required, saved_last_sp); - guarantee(java_dyn_MethodHandle::vmentry_offset_in_bytes() != 0, "must have offsets"); + guarantee(java_lang_invoke_MethodHandle::vmentry_offset_in_bytes() != 0, "must have offsets"); // some handy addresses Address rbx_method_fie( rbx, methodOopDesc::from_interpreted_offset() ); Address rbx_method_fce( rbx, methodOopDesc::from_compiled_offset() ); - Address rcx_mh_vmtarget( rcx_recv, java_dyn_MethodHandle::vmtarget_offset_in_bytes() ); - Address rcx_dmh_vmindex( rcx_recv, sun_dyn_DirectMethodHandle::vmindex_offset_in_bytes() ); + Address rcx_mh_vmtarget( rcx_recv, java_lang_invoke_MethodHandle::vmtarget_offset_in_bytes() ); + Address rcx_dmh_vmindex( rcx_recv, java_lang_invoke_DirectMethodHandle::vmindex_offset_in_bytes() ); - Address rcx_bmh_vmargslot( rcx_recv, sun_dyn_BoundMethodHandle::vmargslot_offset_in_bytes() ); - Address rcx_bmh_argument( rcx_recv, sun_dyn_BoundMethodHandle::argument_offset_in_bytes() ); + Address rcx_bmh_vmargslot( rcx_recv, java_lang_invoke_BoundMethodHandle::vmargslot_offset_in_bytes() ); + Address rcx_bmh_argument( rcx_recv, java_lang_invoke_BoundMethodHandle::argument_offset_in_bytes() ); - Address rcx_amh_vmargslot( rcx_recv, sun_dyn_AdapterMethodHandle::vmargslot_offset_in_bytes() ); - Address rcx_amh_argument( rcx_recv, sun_dyn_AdapterMethodHandle::argument_offset_in_bytes() ); - Address rcx_amh_conversion( rcx_recv, sun_dyn_AdapterMethodHandle::conversion_offset_in_bytes() ); + Address rcx_amh_vmargslot( rcx_recv, java_lang_invoke_AdapterMethodHandle::vmargslot_offset_in_bytes() ); + Address rcx_amh_argument( rcx_recv, java_lang_invoke_AdapterMethodHandle::argument_offset_in_bytes() ); + Address rcx_amh_conversion( rcx_recv, java_lang_invoke_AdapterMethodHandle::conversion_offset_in_bytes() ); Address vmarg; // __ argument_address(vmargslot) const int java_mirror_offset = klassOopDesc::klass_part_offset_in_bytes() + Klass::java_mirror_offset_in_bytes(); @@ -460,7 +460,7 @@ Register rbx_method = rbx_temp; Label L_no_method; - // FIXME: fill in _raise_exception_method with a suitable sun.dyn method + // FIXME: fill in _raise_exception_method with a suitable java.lang.invoke method __ movptr(rbx_method, ExternalAddress((address) &_raise_exception_method)); __ testptr(rbx_method, rbx_method); __ jccb(Assembler::zero, L_no_method);