2497 restore_native_result(masm, ret_type, stack_slots); |
2497 restore_native_result(masm, ret_type, stack_slots); |
2498 } |
2498 } |
2499 |
2499 |
2500 __ reset_last_Java_frame(false); |
2500 __ reset_last_Java_frame(false); |
2501 |
2501 |
2502 // Unpack oop result |
2502 // Unbox oop result, e.g. JNIHandles::resolve value. |
2503 if (ret_type == T_OBJECT || ret_type == T_ARRAY) { |
2503 if (ret_type == T_OBJECT || ret_type == T_ARRAY) { |
2504 Label L; |
2504 __ resolve_jobject(rax /* value */, |
2505 __ testptr(rax, rax); |
2505 r15_thread /* thread */, |
2506 __ jcc(Assembler::zero, L); |
2506 rcx /* tmp */); |
2507 __ movptr(rax, Address(rax, 0)); |
|
2508 __ bind(L); |
|
2509 __ verify_oop(rax); |
|
2510 } |
2507 } |
2511 |
2508 |
2512 if (!is_critical_native) { |
2509 if (!is_critical_native) { |
2513 // reset handle block |
2510 // reset handle block |
2514 __ movptr(rcx, Address(r15_thread, JavaThread::active_handles_offset())); |
2511 __ movptr(rcx, Address(r15_thread, JavaThread::active_handles_offset())); |