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.cc b/src/stack.cc
index 2b2530b..c13aaf4 100644
--- a/src/stack.cc
+++ b/src/stack.cc
@@ -68,12 +68,18 @@
   if (cur_shadow_frame_ != NULL) {
     return cur_shadow_frame_->GetDexPC();
   } else if (cur_quick_frame_ != NULL) {
-    return GetMethod()->ToDexPC(cur_quick_frame_pc_);
+    return GetMethod()->ToDexPc(cur_quick_frame_pc_);
   } else {
     return 0;
   }
 }
 
+size_t StackVisitor::GetNativePcOffset() const {
+  DCHECK(!IsShadowFrame());
+  return GetMethod()->NativePcOffset(cur_quick_frame_pc_);
+}
+
+
 uint32_t StackVisitor::GetVReg(Method* m, int vreg) const {
   if (cur_quick_frame_ != NULL) {
     DCHECK(context_ != NULL); // You can't reliably read registers without a context.