Deoptimization support in optimizing compiler for setting local values

Due to compiler optimizations, we may not always be able to update
the value of a local variable in a compiled frame (like a variable
seen as constant by the compiler). To avoid that situation, we simply
deoptimize compiled frames updated by the debugger so they are
executed by the interpreter with the updated value.

When the debugger attempts to set a local variable (actually a DEX
register or a pair of registers) in a compiled frame, we allocate a
ShadowFrame associated to that frame (using its frame id) and set the
new value in that ShadowFrame. When we know we are about to continue
the execution of the compiled frame, we deoptimize the stack using
the preallocated ShadowFrame (instead of creating a new one). We
initialize it with the current value of all DEX registers except
the ones that have been set by the debugger. Therefore, the
ShadowFrame represent the runtime context modified by the debugger.

Bumps oat version to force recompilation.

Bug: 19944235
Change-Id: I0ebe6241264f7a3be0f14ee4516c1f7436e04da6
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc
index 7e2a84d..deada4c 100644
--- a/runtime/instrumentation.cc
+++ b/runtime/instrumentation.cc
@@ -297,6 +297,11 @@
   thread->VerifyStack();
 }
 
+void Instrumentation::InstrumentThreadStack(Thread* thread) {
+  instrumentation_stubs_installed_ = true;
+  InstrumentationInstallStack(thread, this);
+}
+
 // Removes the instrumentation exit pc as the return PC for every quick frame.
 static void InstrumentationRestoreStack(Thread* thread, void* arg)
     SHARED_REQUIRES(Locks::mutator_lock_) {
@@ -1001,7 +1006,8 @@
 
   ArtMethod* method = instrumentation_frame.method_;
   uint32_t length;
-  char return_shorty = method->GetShorty(&length)[0];
+  const size_t pointer_size = Runtime::Current()->GetClassLinker()->GetImagePointerSize();
+  char return_shorty = method->GetInterfaceMethodIfProxy(pointer_size)->GetShorty(&length)[0];
   JValue return_value;
   if (return_shorty == 'V') {
     return_value.SetJ(0);