comparison src/cpu/zero/vm/cppInterpreter_zero.cpp @ 3781:d83ac25d0304

7055355: JSR 292: crash while throwing WrongMethodTypeException Reviewed-by: jrose, twisti, bdelsart
author never
date Thu, 16 Jun 2011 13:46:55 -0700
parents 3d2ab563047a
children 7f410b6ea66c
comparison
equal deleted inserted replaced
3759:cfcf2ba8f3eb 3781:d83ac25d0304
655 oop mhtype = java_lang_invoke_MethodHandle::type(method_handle); 655 oop mhtype = java_lang_invoke_MethodHandle::type(method_handle);
656 bool is_exact = mhtype == method_type; 656 bool is_exact = mhtype == method_type;
657 if (!is_exact) { 657 if (!is_exact) {
658 if (method->intrinsic_id() == vmIntrinsics::_invokeExact) { 658 if (method->intrinsic_id() == vmIntrinsics::_invokeExact) {
659 CALL_VM_NOCHECK_NOFIX( 659 CALL_VM_NOCHECK_NOFIX(
660 InterpreterRuntime::throw_WrongMethodTypeException( 660 SharedRuntime::throw_WrongMethodTypeException(
661 thread, method_type, mhtype)); 661 thread, method_type, mhtype));
662 // NB all oops trashed! 662 // NB all oops trashed!
663 assert(HAS_PENDING_EXCEPTION, "should do"); 663 assert(HAS_PENDING_EXCEPTION, "should do");
664 stack->set_sp(unwind_sp); 664 stack->set_sp(unwind_sp);
665 return 0; 665 return 0;
671 // "genericInvoker") is really really odd. I'm hoping it's trying 671 // "genericInvoker") is really really odd. I'm hoping it's trying
672 // to accomodate odd VM/class library combinations I can ignore. 672 // to accomodate odd VM/class library combinations I can ignore.
673 oop adapter = java_lang_invoke_MethodTypeForm::genericInvoker(form); 673 oop adapter = java_lang_invoke_MethodTypeForm::genericInvoker(form);
674 if (adapter == NULL) { 674 if (adapter == NULL) {
675 CALL_VM_NOCHECK_NOFIX( 675 CALL_VM_NOCHECK_NOFIX(
676 InterpreterRuntime::throw_WrongMethodTypeException( 676 SharedRuntime::throw_WrongMethodTypeException(
677 thread, method_type, mhtype)); 677 thread, method_type, mhtype));
678 // NB all oops trashed! 678 // NB all oops trashed!
679 assert(HAS_PENDING_EXCEPTION, "should do"); 679 assert(HAS_PENDING_EXCEPTION, "should do");
680 stack->set_sp(unwind_sp); 680 stack->set_sp(unwind_sp);
681 return 0; 681 return 0;