Rename ObjPtr::Decode to ObjPtr::Ptr

Done to prevent ambiguity with ScopedObjectAccess::Decode.

Bug: 31113334

Test: test-art-host
Change-Id: I07a2497cc9cf66386311798933547471987fc316
diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc
index 38ee468..f8deb8f 100644
--- a/runtime/entrypoints/entrypoint_utils.cc
+++ b/runtime/entrypoints/entrypoint_utils.cc
@@ -160,7 +160,7 @@
       } else {
         JValue jv;
         jv.SetJ(args.at(i).j);
-        mirror::Object* val = BoxPrimitive(Primitive::GetType(shorty[i + 1]), jv).Decode();
+        mirror::Object* val = BoxPrimitive(Primitive::GetType(shorty[i + 1]), jv).Ptr();
         if (val == nullptr) {
           CHECK(soa.Self()->IsExceptionPending());
           return zero;
@@ -193,7 +193,7 @@
       mirror::Class* result_type = interface_method->GetReturnType(true /* resolve */, pointer_size);
       ObjPtr<mirror::Object> result_ref = soa.Decode<mirror::Object>(result);
       JValue result_unboxed;
-      if (!UnboxPrimitiveForResult(result_ref.Decode(), result_type, &result_unboxed)) {
+      if (!UnboxPrimitiveForResult(result_ref.Ptr(), result_type, &result_unboxed)) {
         DCHECK(soa.Self()->IsExceptionPending());
         return zero;
       }
diff --git a/runtime/entrypoints/quick/quick_field_entrypoints.cc b/runtime/entrypoints/quick/quick_field_entrypoints.cc
index 70eb1de..6d17000 100644
--- a/runtime/entrypoints/quick/quick_field_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_field_entrypoints.cc
@@ -151,14 +151,14 @@
                                   StaticObjectRead,
                                   sizeof(mirror::HeapReference<mirror::Object>));
   if (LIKELY(field != nullptr)) {
-    return field->GetObj(field->GetDeclaringClass()).Decode();
+    return field->GetObj(field->GetDeclaringClass()).Ptr();
   }
   field = FindFieldFromCode<StaticObjectRead, true>(field_idx,
                                                     referrer,
                                                     self,
                                                     sizeof(mirror::HeapReference<mirror::Object>));
   if (LIKELY(field != nullptr)) {
-    return field->GetObj(field->GetDeclaringClass()).Decode();
+    return field->GetObj(field->GetDeclaringClass()).Ptr();
   }
   return nullptr;  // Will throw exception by checking with Thread::Current.
 }
@@ -299,7 +299,7 @@
                                   InstanceObjectRead,
                                   sizeof(mirror::HeapReference<mirror::Object>));
   if (LIKELY(field != nullptr && obj != nullptr)) {
-    return field->GetObj(obj).Decode();
+    return field->GetObj(obj).Ptr();
   }
   field = FindInstanceField<InstanceObjectRead, true>(field_idx,
                                                       referrer,
@@ -307,7 +307,7 @@
                                                       sizeof(mirror::HeapReference<mirror::Object>),
                                                       &obj);
   if (LIKELY(field != nullptr)) {
-    return field->GetObj(obj).Decode();
+    return field->GetObj(obj).Ptr();
   }
   return nullptr;  // Will throw exception by checking with Thread::Current.
 }
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index c52bc8e..81513ee 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -834,7 +834,7 @@
 void BuildQuickArgumentVisitor::FixupReferences() {
   // Fixup any references which may have changed.
   for (const auto& pair : references_) {
-    pair.second->Assign(soa_->Decode<mirror::Object>(pair.first).Decode());
+    pair.second->Assign(soa_->Decode<mirror::Object>(pair.first).Ptr());
     soa_->Env()->DeleteLocalRef(pair.first);
   }
 }
@@ -926,7 +926,7 @@
 void RememberForGcArgumentVisitor::FixupReferences() {
   // Fixup any references which may have changed.
   for (const auto& pair : references_) {
-    pair.second->Assign(soa_->Decode<mirror::Object>(pair.first).Decode());
+    pair.second->Assign(soa_->Decode<mirror::Object>(pair.first).Ptr());
     soa_->Env()->DeleteLocalRef(pair.first);
   }
 }