Mercurial > hg > truffle
diff src/share/vm/interpreter/interpreter.cpp @ 13010:bd3237e0e18d
8026328: Setting a breakpoint on invokedynamic crashes the JVM
Reviewed-by: jrose, roland
author | twisti |
---|---|
date | Thu, 24 Oct 2013 16:23:07 -0700 |
parents | b800986664f4 |
children | 096c224171c4 78bbf4d43a14 |
line wrap: on
line diff
--- a/src/share/vm/interpreter/interpreter.cpp Wed Oct 23 19:22:28 2013 +0000 +++ b/src/share/vm/interpreter/interpreter.cpp Thu Oct 24 16:23:07 2013 -0700 @@ -329,15 +329,21 @@ //------------------------------------------------------------------------------------------------------------------------ // Deoptimization support -// If deoptimization happens, this function returns the point of next bytecode to continue execution +/** + * If a deoptimization happens, this function returns the point of next bytecode to continue execution. + */ address AbstractInterpreter::deopt_continue_after_entry(Method* method, address bcp, int callee_parameters, bool is_top_frame) { assert(method->contains(bcp), "just checkin'"); - Bytecodes::Code code = Bytecodes::java_code_at(method, bcp); + + // Get the original and rewritten bytecode. + Bytecodes::Code code = Bytecodes::java_code_at(method, bcp); assert(!Interpreter::bytecode_should_reexecute(code), "should not reexecute"); - int bci = method->bci_from(bcp); - int length = -1; // initial value for debugging + + const int bci = method->bci_from(bcp); + // compute continuation length - length = Bytecodes::length_at(method, bcp); + const int length = Bytecodes::length_at(method, bcp); + // compute result type BasicType type = T_ILLEGAL; @@ -393,7 +399,7 @@ return is_top_frame ? Interpreter::deopt_entry (as_TosState(type), length) - : Interpreter::return_entry(as_TosState(type), length); + : Interpreter::return_entry(as_TosState(type), length, code); } // If deoptimization happens, this function returns the point where the interpreter reexecutes