oat file patching

Change-Id: Idbbdf19f3a77498d79d043fd33ca12ce39cafbb7
diff --git a/src/compiler/codegen/MethodCodegenDriver.cc b/src/compiler/codegen/MethodCodegenDriver.cc
index 59aa4ca..8f4df47 100644
--- a/src/compiler/codegen/MethodCodegenDriver.cc
+++ b/src/compiler/codegen/MethodCodegenDriver.cc
@@ -55,6 +55,7 @@
 void genInvoke(CompilationUnit* cUnit, MIR* mir, InvokeType type, bool isRange)
 {
     DecodedInstruction* dInsn = &mir->dalvikInsn;
+    InvokeType originalType = type;  // avoiding mutation by ComputeInvokeInfo
     int callState = 0;
     LIR* nullCk;
     LIR** pNullCk = NULL;
@@ -103,16 +104,19 @@
     if (!isRange) {
         callState = genDalvikArgsNoRange(cUnit, mir, dInsn, callState, pNullCk,
                                          nextCallInsn, dexMethodIdx,
-                                         vtableIdx, directCode, directMethod, skipThis);
+                                         vtableIdx, directCode, directMethod,
+                                         originalType, skipThis);
     } else {
         callState = genDalvikArgsRange(cUnit, mir, dInsn, callState, pNullCk,
                                        nextCallInsn, dexMethodIdx, vtableIdx,
-                                       directCode, directMethod, skipThis);
+                                       directCode, directMethod, originalType,
+                                       skipThis);
     }
     // Finish up any of the call sequence not interleaved in arg loading
     while (callState >= 0) {
         callState = nextCallInsn(cUnit, mir, callState, dexMethodIdx,
-                                 vtableIdx, directCode, directMethod);
+                                 vtableIdx, directCode, directMethod,
+                                 originalType);
     }
     if (DISPLAY_MISSING_TARGETS) {
         genShowTarget(cUnit);