NativePcOffsetToReferenceMap

Rather than translate a native PC to a Dex PC and then to the reference
bitmap, just go straight from the native PC to the reference bitmap.
Encode the native PC offsets using a hash rather than linearly
searching.

Change-Id: Iee1073d93c941c0a31f639e5f23cea9e9f747bee
diff --git a/src/stack.h b/src/stack.h
index 91b0cf1..21b05c4 100644
--- a/src/stack.h
+++ b/src/stack.h
@@ -243,6 +243,10 @@
     return cur_shadow_frame_ != NULL;
   }
 
+  uint32_t GetDexPc() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
+  size_t GetNativePcOffset() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
   uintptr_t LoadCalleeSave(int num, size_t frame_size) const {
     // Callee saves are held at the top of the frame
     Method* method = GetMethod();
@@ -255,8 +259,6 @@
     return *reinterpret_cast<uintptr_t*>(save_addr);
   }
 
-  uint32_t GetDexPc() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-
   // Returns the height of the stack in the managed stack frames, including transitions.
   size_t GetFrameHeight() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
     return GetNumFrames() - cur_depth_;
@@ -274,8 +276,7 @@
     return num_frames_;
   }
 
-  uint32_t GetVReg(Method* m, int vreg) const
-      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+  uint32_t GetVReg(Method* m, int vreg) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
   void SetVReg(Method* m, int vreg, uint32_t new_value)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);