hotspot/src/share/vm/interpreter/interpreter.cpp
changeset 21198 dd647e8d1d72
parent 18507 61bfc8995bb3
child 24424 2658d7834c6e
--- a/hotspot/src/share/vm/interpreter/interpreter.cpp	Wed Oct 23 19:22:28 2013 +0000
+++ b/hotspot/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