Refactor the use of Method by the oat compiler.

Change-Id: Ib0ee18ed06846f82567f746edc7a5049dc6215df
diff --git a/src/compiler/SSATransformation.cc b/src/compiler/SSATransformation.cc
index d35a8c7..235521d 100644
--- a/src/compiler/SSATransformation.cc
+++ b/src/compiler/SSATransformation.cc
@@ -107,10 +107,10 @@
      * Also set the incoming parameters as defs in the entry block.
      * Only need to handle the parameters for the outer method.
      */
-    int inReg = cUnit->method->NumRegisters() - cUnit->method->NumIns();
-    for (; inReg < cUnit->method->NumRegisters(); inReg++) {
-        oatSetBit(cUnit->defBlockMatrix[inReg],
-                          cUnit->entryBlock->id);
+    int numRegs = cUnit->numDalvikRegisters;
+    int inReg = numRegs - cUnit->numIns;
+    for (; inReg < numRegs; inReg++) {
+        oatSetBit(cUnit->defBlockMatrix[inReg], cUnit->entryBlock->id);
     }
 }
 
@@ -562,7 +562,7 @@
 
     /* Process this block */
     oatDoSSAConversion(cUnit, block);
-    int mapSize = sizeof(int) * cUnit->method->NumRegisters();
+    int mapSize = sizeof(int) * cUnit->numDalvikRegisters;
 
     /* Save SSA map snapshot */
     int* savedSSAMap = (int*)oatNew(mapSize, false);