Resolve method's argument reference types

Using ResolveClassAndCheckAccess allows to resolve reference types and check
we have access to these types too. This also prevents from getting unresolved
reference types, which has been observed during deoptimization.

Bug: 13464407
Change-Id: I4c02fdff191c195f34502a4d4a20357419982eb1
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index 535c76d..4159c08 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -1176,8 +1176,11 @@
         // it's effectively considered initialized the instant we reach here (in the sense that we
         // can return without doing anything or call virtual methods).
         {
-          const RegType& reg_type = reg_types_.FromDescriptor(class_loader_->get(), descriptor,
-                                                              false);
+          const RegType& reg_type = ResolveClassAndCheckAccess(iterator.GetTypeIdx());
+          if (!reg_type.IsNonZeroReferenceTypes()) {
+            DCHECK(HasFailures());
+            return false;
+          }
           reg_line->SetRegisterType(arg_start + cur_arg, reg_type);
         }
         break;