src/share/vm/runtime/sharedRuntime.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6893081 Cdiff src/share/vm/runtime/sharedRuntime.cpp

src/share/vm/runtime/sharedRuntime.cpp

Print this page
rev 1081 : imported patch indy-cleanup-6893081.patch

*** 800,810 **** assert (receiver.is_null() || receiver->is_oop(), "wrong receiver"); LinkResolver::resolve_invoke(callinfo, receiver, constants, bytecode_index, bc, CHECK_(nullHandle)); #ifdef ASSERT // Check that the receiver klass is of the right subtype and that it is initialized for virtual calls ! if (bc != Bytecodes::_invokestatic) { assert(receiver.not_null(), "should have thrown exception"); KlassHandle receiver_klass (THREAD, receiver->klass()); klassOop rk = constants->klass_ref_at(bytecode_index, CHECK_(nullHandle)); // klass is already loaded KlassHandle static_receiver_klass (THREAD, rk); --- 800,810 ---- assert (receiver.is_null() || receiver->is_oop(), "wrong receiver"); LinkResolver::resolve_invoke(callinfo, receiver, constants, bytecode_index, bc, CHECK_(nullHandle)); #ifdef ASSERT // Check that the receiver klass is of the right subtype and that it is initialized for virtual calls ! if (bc != Bytecodes::_invokestatic && bc != Bytecodes::_invokedynamic) { assert(receiver.not_null(), "should have thrown exception"); KlassHandle receiver_klass (THREAD, receiver->klass()); klassOop rk = constants->klass_ref_at(bytecode_index, CHECK_(nullHandle)); // klass is already loaded KlassHandle static_receiver_klass (THREAD, rk);
*** 1025,1035 **** // safepoint is possible and have trouble gc'ing the compiled args. RegisterMap reg_map(thread, false); frame stub_frame = thread->last_frame(); assert(stub_frame.is_runtime_frame(), "sanity check"); frame caller_frame = stub_frame.sender(&reg_map); ! if (caller_frame.is_interpreted_frame() || caller_frame.is_entry_frame() ) { methodOop callee = thread->callee_target(); guarantee(callee != NULL && callee->is_method(), "bad handshake"); thread->set_vm_result(callee); thread->set_callee_target(NULL); return callee->get_c2i_entry(); --- 1025,1044 ---- // safepoint is possible and have trouble gc'ing the compiled args. RegisterMap reg_map(thread, false); frame stub_frame = thread->last_frame(); assert(stub_frame.is_runtime_frame(), "sanity check"); frame caller_frame = stub_frame.sender(&reg_map); ! ! // MethodHandle invokes don't have a CompiledIC and should always ! // simply redispatch to the callee_target. ! address sender_pc = caller_frame.pc(); ! CodeBlob* sender_cb = caller_frame.cb(); ! nmethod* sender_nm = sender_cb->as_nmethod_or_null(); ! ! if (caller_frame.is_interpreted_frame() || ! caller_frame.is_entry_frame() || ! (sender_nm != NULL && sender_nm->is_method_handle_return(sender_pc))) { methodOop callee = thread->callee_target(); guarantee(callee != NULL && callee->is_method(), "bad handshake"); thread->set_vm_result(callee); thread->set_callee_target(NULL); return callee->get_c2i_entry();
src/share/vm/runtime/sharedRuntime.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File