Improve interpreter performance.

Bug: 8196227

This CL removes the use of DecodedInstruction to read instruction opcode and
operands. It now directly access to each operand according to instruction
format (like VRegA_11x for accessing register vA with format 11x).

It also caches some information used for instrumentation like 'this' object
and current method and add missing check about pending exception.

Change-Id: I8c03c0aea9d75068b89e3cb2c8c12383d7928281
diff --git a/src/stack.h b/src/stack.h
index 8e597b2..d6ff9c6 100644
--- a/src/stack.h
+++ b/src/stack.h
@@ -126,11 +126,13 @@
   }
 
   int64_t GetVRegLong(size_t i) const {
+    DCHECK_LT(i, NumberOfVRegs());
     const uint32_t* vreg = &vregs_[i];
     return *reinterpret_cast<const int64_t*>(vreg);
   }
 
   double GetVRegDouble(size_t i) const {
+    DCHECK_LT(i, NumberOfVRegs());
     const uint32_t* vreg = &vregs_[i];
     return *reinterpret_cast<const double*>(vreg);
   }
@@ -163,11 +165,13 @@
   }
 
   void SetVRegLong(size_t i, int64_t val) {
+    DCHECK_LT(i, NumberOfVRegs());
     uint32_t* vreg = &vregs_[i];
     *reinterpret_cast<int64_t*>(vreg) = val;
   }
 
   void SetVRegDouble(size_t i, double val) {
+    DCHECK_LT(i, NumberOfVRegs());
     uint32_t* vreg = &vregs_[i];
     *reinterpret_cast<double*>(vreg) = val;
   }