Clean up shadow frame.

Created version of GetThisObject that takes num_ins to get the object
without having to get the code item again. Also using memset to clear
the registers on initialization.

Change-Id: I02b255f0c47d2d3c55783f4c96dc93983015f019
diff --git a/src/stack.h b/src/stack.h
index 1b4d285..fbfacb1 100644
--- a/src/stack.h
+++ b/src/stack.h
@@ -202,6 +202,8 @@
 
   mirror::Object* GetThisObject() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
+  mirror::Object* GetThisObject(uint16_t num_ins) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
   ThrowLocation GetCurrentLocationForThrow() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
   void SetMethod(mirror::AbstractMethod* method) {
@@ -254,13 +256,9 @@
       CHECK_LT(num_vregs, static_cast<uint32_t>(kHasReferenceArray));
       number_of_vregs_ |= kHasReferenceArray;
 #endif
-      for (size_t i = 0; i < num_vregs; ++i) {
-        SetVRegReference(i, NULL);
-      }
+      memset(vregs_, 0, num_vregs * (sizeof(uint32_t) + sizeof(mirror::Object*)));
     } else {
-      for (size_t i = 0; i < num_vregs; ++i) {
-        SetVReg(i, 0);
-      }
+      memset(vregs_, 0, num_vregs * sizeof(uint32_t));
     }
   }