src/cpu/x86/vm/methodHandles_x86.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/cpu/x86/vm/methodHandles_x86.cpp Thu Jun 16 10:41:39 2011
--- new/src/cpu/x86/vm/methodHandles_x86.cpp Thu Jun 16 10:41:39 2011
*** 600,618 ****
--- 600,611 ----
__ jump_to_method_handle_entry(rcx_recv, rdi_temp);
// error path for invokeExact (only)
__ bind(invoke_exact_error_path);
// jump(ExternalAddress(Interpreter::throw_WrongMethodType_entry()));
! Register rdx_last_Java_sp = rdx_temp;
__ lea(rdx_last_Java_sp, __ argument_address(constant(0)));
__ super_call_VM(noreg,
rdx_last_Java_sp,
CAST_FROM_FN_PTR(address,
InterpreterRuntime::throw_WrongMethodTypeException),
// pass required type, then failing mh object
rax_mtype, rcx_recv);
+ // Stub wants expected type in rax and the actual type in rcx
! __ jump(ExternalAddress(StubRoutines::throw_WrongMethodTypeException_entry()));
// for invokeGeneric (only), apply argument and result conversions on the fly
__ bind(invoke_generic_slow_path);
#ifdef ASSERT
if (VerifyMethodHandles) {
*** 1173,1203 ****
--- 1166,1184 ----
const Register rdi_pc = rax;
__ pop(rdi_pc); // caller PC
__ mov(rsp, saved_last_sp); // cut the stack back to where the caller started
Register rbx_method = rbx_temp;
Label L_no_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);
const int jobject_oop_offset = 0;
__ movptr(rbx_method, Address(rbx_method, jobject_oop_offset)); // dereference the jobject
__ testptr(rbx_method, rbx_method);
__ jccb(Assembler::zero, L_no_method);
__ verify_oop(rbx_method);
NOT_LP64(__ push(rarg2_required));
__ push(rdi_pc); // restore caller PC
__ jmp(rbx_method_fce); // jump to compiled entry
// Do something that is at least causes a valid throw from the interpreter.
__ bind(L_no_method);
__ push(rarg2_required);
__ push(rarg1_actual);
__ jump(ExternalAddress(Interpreter::throw_WrongMethodType_entry()));
}
break;
case _invokestatic_mh:
case _invokespecial_mh:
src/cpu/x86/vm/methodHandles_x86.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File