< 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,21 +3135,25 @@
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
- O2_Klass, Rinterface, Rindex,
+ 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);
- call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError));
+ // 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,11 +3162,13 @@
__ 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));
+ // 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,11 +3540,11 @@
}
void TemplateTable::_breakpoint() {
// Note: We get here even if we are single stepping..
- // jbug inists on setting breakpoints at every bytecode
+ // 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 >