< prev index next >

src/hotspot/cpu/sparc/templateTable_sparc.cpp

Print this page
rev 49011 : 8197405: Improve messages of AbstractMethodErrors and IncompatibleClassChangeErrors.
Reviewed-by: coleenp, dholmes

*** 3135,3155 **** const Register Rindex = G5_method; __ ld(Rmethod, Method::itable_index_offset(), Rindex); __ sub(Rindex, Method::itable_index_max, Rindex); __ neg(Rindex); __ lookup_interface_method(// inputs: rec. class, interface, itable index ! O2_Klass, Rinterface, Rindex, // outputs: method, scan temp reg, temp reg G5_method, Rscratch, Rtemp, L_no_such_interface); // Check for abstract method error. { Label ok; __ br_notnull_short(G5_method, Assembler::pt, ok); ! call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError)); __ should_not_reach_here(); __ bind(ok); } Register Rcall = Rinterface; --- 3135,3159 ---- const Register Rindex = G5_method; __ ld(Rmethod, Method::itable_index_offset(), Rindex); __ sub(Rindex, Method::itable_index_max, Rindex); __ neg(Rindex); + // Preserve O2_Klass for throw_AbstractMethodErrorVerbose + __ mov(O2_Klass, O4); __ lookup_interface_method(// inputs: rec. class, interface, itable index ! O4, Rinterface, Rindex, // outputs: method, scan temp reg, temp reg G5_method, Rscratch, Rtemp, L_no_such_interface); // Check for abstract method error. { Label ok; __ br_notnull_short(G5_method, Assembler::pt, ok); ! // Pass arguments for generating a verbose error message. ! call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodErrorVerbose), ! O2_Klass, Rmethod); __ should_not_reach_here(); __ bind(ok); } Register Rcall = Rinterface;
*** 3158,3168 **** __ profile_arguments_type(G5_method, Rcall, Gargs, true); __ profile_called_method(G5_method, Rscratch); __ call_from_interpreter(Rcall, Gargs, Rret); __ bind(L_no_such_interface); ! call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeError)); __ should_not_reach_here(); } void TemplateTable::invokehandle(int byte_no) { transition(vtos, vtos); --- 3162,3174 ---- __ profile_arguments_type(G5_method, Rcall, Gargs, true); __ profile_called_method(G5_method, Rscratch); __ call_from_interpreter(Rcall, Gargs, Rret); __ bind(L_no_such_interface); ! // Pass arguments for generating a verbose error message. ! call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeErrorVerbose), ! O2_Klass, Rinterface); __ should_not_reach_here(); } void TemplateTable::invokehandle(int byte_no) { transition(vtos, vtos);
*** 3534,3544 **** } void TemplateTable::_breakpoint() { // Note: We get here even if we are single stepping.. ! // jbug inists on setting breakpoints at every bytecode // even if we are in single step mode. transition(vtos, vtos); // get the unpatched byte code __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::get_original_bytecode_at), Lmethod, Lbcp); --- 3540,3550 ---- } void TemplateTable::_breakpoint() { // Note: We get here even if we are single stepping.. ! // jbug insists on setting breakpoints at every bytecode // even if we are in single step mode. transition(vtos, vtos); // get the unpatched byte code __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::get_original_bytecode_at), Lmethod, Lbcp);
< prev index next >