Rename PcToReferenceMap adding Dex.

Change-Id: I21ebfe9ac7fd8a627299f1f721eb4b11c87642dc
diff --git a/src/oatdump.cc b/src/oatdump.cc
index 86137d5..54183bb 100644
--- a/src/oatdump.cc
+++ b/src/oatdump.cc
@@ -394,9 +394,9 @@
     }
     uint32_t gc_map_length = (gc_map_raw[0] << 24) | (gc_map_raw[1] << 16) |
                              (gc_map_raw[2] << 8) | (gc_map_raw[3] << 0);
-    verifier::PcToReferenceMap map(gc_map_raw + sizeof(uint32_t), gc_map_length);
+    verifier::DexPcToReferenceMap map(gc_map_raw + sizeof(uint32_t), gc_map_length);
     for (size_t entry = 0; entry < map.NumEntries(); entry++) {
-      os << StringPrintf("\t\t\t0x%04x", map.GetPC(entry));
+      os << StringPrintf("\t\t\t0x%04x", map.GetDexPc(entry));
       size_t num_regs = map.RegWidth() * 8;
       const uint8_t* reg_bitmap = map.GetBitMap(entry);
       bool first = true;
diff --git a/src/thread.cc b/src/thread.cc
index e45ed48..e3bbc4d 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -1714,7 +1714,7 @@
         CHECK(gc_map != NULL) << PrettyMethod(m);
         uint32_t gc_map_length = m->GetGcMapLength();
         CHECK_NE(0U, gc_map_length) << PrettyMethod(m);
-        verifier::PcToReferenceMap map(gc_map, gc_map_length);
+        verifier::DexPcToReferenceMap map(gc_map, gc_map_length);
         const uint8_t* reg_bitmap = map.FindBitMap(GetDexPc());
         CHECK(reg_bitmap != NULL);
         const VmapTable vmap_table(m->GetVmapTableRaw());
diff --git a/src/verifier/gc_map.cc b/src/verifier/gc_map.cc
index a9d481e..66cb6c7 100644
--- a/src/verifier/gc_map.cc
+++ b/src/verifier/gc_map.cc
@@ -21,13 +21,13 @@
 namespace art {
 namespace verifier {
 
-const uint8_t* PcToReferenceMap::FindBitMap(uint16_t dex_pc, bool error_if_not_present) const {
+const uint8_t* DexPcToReferenceMap::FindBitMap(uint16_t dex_pc, bool error_if_not_present) const {
   size_t num_entries = NumEntries();
   // Do linear or binary search?
   static const size_t kSearchThreshold = 8;
   if (num_entries < kSearchThreshold) {
     for (size_t i = 0; i < num_entries; i++)  {
-      if (GetPC(i) == dex_pc) {
+      if (GetDexPc(i) == dex_pc) {
         return GetBitMap(i);
       }
     }
@@ -36,7 +36,7 @@
     int hi = num_entries -1;
     while (hi >= lo) {
       int mid = (hi + lo) / 2;
-      int mid_pc = GetPC(mid);
+      int mid_pc = GetDexPc(mid);
       if (dex_pc > mid_pc) {
         lo = mid + 1;
       } else if (dex_pc < mid_pc) {
diff --git a/src/verifier/gc_map.h b/src/verifier/gc_map.h
index 07f6317..d6a1c46 100644
--- a/src/verifier/gc_map.h
+++ b/src/verifier/gc_map.h
@@ -34,10 +34,10 @@
   kRegMapFormatCompact16 = 3, // Compact layout, 16-bit addresses.
 };
 
-// Lightweight wrapper for PC to reference bit maps.
-class PcToReferenceMap {
+// Lightweight wrapper for Dex PC to reference bit maps.
+class DexPcToReferenceMap {
  public:
-  PcToReferenceMap(const uint8_t* data, size_t data_length) {
+  DexPcToReferenceMap(const uint8_t* data, size_t data_length) {
     data_ = data;
     CHECK(data_ != NULL);
     // Check the size of the table agrees with the number of entries
@@ -50,8 +50,8 @@
     return GetData()[2] | (GetData()[3] << 8);
   }
 
-  // Get the PC at the given index
-  uint16_t GetPC(size_t index) const {
+  // Get the Dex PC at the given index
+  uint16_t GetDexPc(size_t index) const {
     size_t entry_offset = index * EntryWidth();
     if (PcWidth() == 1) {
       return Table()[entry_offset];
diff --git a/src/verifier/method_verifier.cc b/src/verifier/method_verifier.cc
index 8cbf23e..a01aa8d 100644
--- a/src/verifier/method_verifier.cc
+++ b/src/verifier/method_verifier.cc
@@ -3163,8 +3163,8 @@
     return NULL;
   }
   // Write table header
-  table->push_back(format | ((ref_bitmap_bytes >> PcToReferenceMap::kRegMapFormatShift) &
-                             ~PcToReferenceMap::kRegMapFormatMask));
+  table->push_back(format | ((ref_bitmap_bytes >> DexPcToReferenceMap::kRegMapFormatShift) &
+                             ~DexPcToReferenceMap::kRegMapFormatMask));
   table->push_back(ref_bitmap_bytes & 0xFF);
   table->push_back(num_entries & 0xFF);
   table->push_back((num_entries >> 8) & 0xFF);
@@ -3186,13 +3186,13 @@
 void MethodVerifier::VerifyGcMap(const std::vector<uint8_t>& data) {
   // Check that for every GC point there is a map entry, there aren't entries for non-GC points,
   // that the table data is well formed and all references are marked (or not) in the bitmap
-  PcToReferenceMap map(&data[0], data.size());
+  DexPcToReferenceMap map(&data[0], data.size());
   size_t map_index = 0;
   for (size_t i = 0; i < code_item_->insns_size_in_code_units_; i++) {
     const uint8_t* reg_bitmap = map.FindBitMap(i, false);
     if (insn_flags_[i].IsGcPoint()) {
       CHECK_LT(map_index, map.NumEntries());
-      CHECK_EQ(map.GetPC(map_index), i);
+      CHECK_EQ(map.GetDexPc(map_index), i);
       CHECK_EQ(map.GetBitMap(map_index), reg_bitmap);
       map_index++;
       RegisterLine* line = reg_table_.GetLine(i);
diff --git a/src/verifier/method_verifier.h b/src/verifier/method_verifier.h
index 7eaf672..92621ef 100644
--- a/src/verifier/method_verifier.h
+++ b/src/verifier/method_verifier.h
@@ -49,7 +49,7 @@
 
 class MethodVerifier;
 class InsnFlags;
-class PcToReferenceMap;
+class DexPcToReferenceMap;
 
 /*
  * "Direct" and "virtual" methods are stored independently. The type of call used to invoke the
diff --git a/test/ReferenceMap/stack_walk_refmap_jni.cc b/test/ReferenceMap/stack_walk_refmap_jni.cc
index e6d652d..8cb1ed2 100644
--- a/test/ReferenceMap/stack_walk_refmap_jni.cc
+++ b/test/ReferenceMap/stack_walk_refmap_jni.cc
@@ -55,7 +55,7 @@
     }
     LOG(INFO) << "At " << PrettyMethod(m, false);
 
-    verifier::PcToReferenceMap map(m->GetGcMap(), m->GetGcMapLength());
+    verifier::DexPcToReferenceMap map(m->GetGcMap(), m->GetGcMapLength());
 
     if (m->IsCalleeSaveMethod()) {
       LOG(WARNING) << "no PC for " << PrettyMethod(m);
diff --git a/test/StackWalk/stack_walk_jni.cc b/test/StackWalk/stack_walk_jni.cc
index 444eaed..5fdb92f 100644
--- a/test/StackWalk/stack_walk_jni.cc
+++ b/test/StackWalk/stack_walk_jni.cc
@@ -58,7 +58,7 @@
     }
     const uint8_t* reg_bitmap = NULL;
     if (!IsShadowFrame()) {
-      verifier::PcToReferenceMap map(m->GetGcMap(), m->GetGcMapLength());
+      verifier::DexPcToReferenceMap map(m->GetGcMap(), m->GetGcMapLength());
       reg_bitmap = map.FindBitMap(GetDexPc());
     }
     MethodHelper mh(m);