ART: Redo verification on class resolution failure

During compile-time verification, when a class needs to be resolved
and access to that class checked, if we can't resolve the class,
do a conservative access check and post an ACCESS_CLASS failure, if
necessary. This will trigger a re-verification at runtime, when the
class should be available.

Fix an invoke-polymorphic test to not trigger dead code. Fix method
expectations in verifier_deps_test.

Bug: 64681719
Test: m test-art-host
Test: cts-tradefed run commandAndExit cts --m vm-tests-tf
Change-Id: I3639639476f6938e10df1b0dac4545fe841a6ad2
diff --git a/compiler/verifier_deps_test.cc b/compiler/verifier_deps_test.cc
index 6538925..5c097da 100644
--- a/compiler/verifier_deps_test.cc
+++ b/compiler/verifier_deps_test.cc
@@ -624,7 +624,7 @@
 }
 
 TEST_F(VerifierDepsTest, ConstClass_Unresolved) {
-  ASSERT_TRUE(VerifyMethod("ConstClass_Unresolved"));
+  ASSERT_FALSE(VerifyMethod("ConstClass_Unresolved"));
   ASSERT_TRUE(HasClass("LUnresolvedClass;", false));
 }
 
@@ -634,7 +634,7 @@
 }
 
 TEST_F(VerifierDepsTest, CheckCast_Unresolved) {
-  ASSERT_TRUE(VerifyMethod("CheckCast_Unresolved"));
+  ASSERT_FALSE(VerifyMethod("CheckCast_Unresolved"));
   ASSERT_TRUE(HasClass("LUnresolvedClass;", false));
 }
 
@@ -644,7 +644,7 @@
 }
 
 TEST_F(VerifierDepsTest, InstanceOf_Unresolved) {
-  ASSERT_TRUE(VerifyMethod("InstanceOf_Unresolved"));
+  ASSERT_FALSE(VerifyMethod("InstanceOf_Unresolved"));
   ASSERT_TRUE(HasClass("LUnresolvedClass;", false));
 }
 
@@ -654,12 +654,12 @@
 }
 
 TEST_F(VerifierDepsTest, NewInstance_Unresolved) {
-  ASSERT_TRUE(VerifyMethod("NewInstance_Unresolved"));
+  ASSERT_FALSE(VerifyMethod("NewInstance_Unresolved"));
   ASSERT_TRUE(HasClass("LUnresolvedClass;", false));
 }
 
 TEST_F(VerifierDepsTest, NewArray_Unresolved) {
-  ASSERT_TRUE(VerifyMethod("NewArray_Unresolved"));
+  ASSERT_FALSE(VerifyMethod("NewArray_Unresolved"));
   ASSERT_TRUE(HasClass("[LUnresolvedClass;", false));
 }