src/cpu/x86/vm/interpreter_x86_32.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/cpu/x86/vm/interpreter_x86_32.cpp	Tue Jan 20 02:14:07 2009
--- new/src/cpu/x86/vm/interpreter_x86_32.cpp	Tue Jan 20 02:14:07 2009

*** 199,221 **** --- 199,247 ---- // rsi: sender SP address entry_point = __ pc(); // abstract method entry // adjust stack to what a normal return would do __ mov(rsp, rsi); + // pop return address, reset last_sp to NULL + __ empty_expression_stack(); + __ restore_bcp(); // rsi must be correct for exception handler (was destroyed) + __ restore_locals(); // make sure locals pointer is correct as well (was destroyed) + // throw exception __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError)); // the call_VM checks for exception, so we should never return here. __ should_not_reach_here(); return entry_point; } + + // Method handle invoker + // Dispatch a method of the form java.dyn.MethodHandles::invoke(...) + address InterpreterGenerator::generate_method_handle_entry(void) { + if (!MethodHandleSupport) { + return generate_abstract_entry(); + } + + // incoming registers: rax, rcx + Register rax_mtype = rax; + Register rcx_recv = rcx; + + Label wrong_method_type; + address entry_point = MethodHandles::generate_method_handle_interpreter_entry(_masm, wrong_method_type); + + __ bind(wrong_method_type); + __ push(rax_mtype); // missed mtype (required) + __ push(rcx_recv); // bad mh (actual) + __ movptr(rdx, ExternalAddress((address) &Interpreter::_throw_WrongMethodType_entry)); + __ call(rdx); + + return entry_point; + } + + // This method tells the deoptimizer how big an interpreted frame must be: int AbstractInterpreter::size_activation(methodOop method, int tempcount, int popframe_extra_args, int moncount,

src/cpu/x86/vm/interpreter_x86_32.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File