1.1 --- a/src/cpu/x86/vm/methodHandles_x86.cpp Wed Jun 15 10:20:03 2011 -0700 1.2 +++ b/src/cpu/x86/vm/methodHandles_x86.cpp Thu Jun 16 13:46:55 2011 -0700 1.3 @@ -602,15 +602,8 @@ 1.4 1.5 // error path for invokeExact (only) 1.6 __ bind(invoke_exact_error_path); 1.7 - // jump(ExternalAddress(Interpreter::throw_WrongMethodType_entry())); 1.8 - Register rdx_last_Java_sp = rdx_temp; 1.9 - __ lea(rdx_last_Java_sp, __ argument_address(constant(0))); 1.10 - __ super_call_VM(noreg, 1.11 - rdx_last_Java_sp, 1.12 - CAST_FROM_FN_PTR(address, 1.13 - InterpreterRuntime::throw_WrongMethodTypeException), 1.14 - // pass required type, then failing mh object 1.15 - rax_mtype, rcx_recv); 1.16 + // Stub wants expected type in rax and the actual type in rcx 1.17 + __ jump(ExternalAddress(StubRoutines::throw_WrongMethodTypeException_entry())); 1.18 1.19 // for invokeGeneric (only), apply argument and result conversions on the fly 1.20 __ bind(invoke_generic_slow_path); 1.21 @@ -1175,27 +1168,15 @@ 1.22 __ mov(rsp, saved_last_sp); // cut the stack back to where the caller started 1.23 1.24 Register rbx_method = rbx_temp; 1.25 - Label L_no_method; 1.26 - // FIXME: fill in _raise_exception_method with a suitable java.lang.invoke method 1.27 __ movptr(rbx_method, ExternalAddress((address) &_raise_exception_method)); 1.28 - __ testptr(rbx_method, rbx_method); 1.29 - __ jccb(Assembler::zero, L_no_method); 1.30 1.31 const int jobject_oop_offset = 0; 1.32 __ movptr(rbx_method, Address(rbx_method, jobject_oop_offset)); // dereference the jobject 1.33 - __ testptr(rbx_method, rbx_method); 1.34 - __ jccb(Assembler::zero, L_no_method); 1.35 __ verify_oop(rbx_method); 1.36 1.37 NOT_LP64(__ push(rarg2_required)); 1.38 __ push(rdi_pc); // restore caller PC 1.39 __ jmp(rbx_method_fce); // jump to compiled entry 1.40 - 1.41 - // Do something that is at least causes a valid throw from the interpreter. 1.42 - __ bind(L_no_method); 1.43 - __ push(rarg2_required); 1.44 - __ push(rarg1_actual); 1.45 - __ jump(ExternalAddress(Interpreter::throw_WrongMethodType_entry())); 1.46 } 1.47 break; 1.48