ART: Clean up verify and read barrier flags.

Remove read barrier option from Class::IsArrayClass() and
related functions. Comparison with null does not need the
read barrier and the primitive type should be the same when
read from the from-space version of a class as when read
from the to-space version.

Propagate the verify flags to a few more functions and
simplify Class::IsClassClass().

Remove pointer size check from Class::EmbeddedVTableOffset()
in preparation for patching the boot image in place before
the Runtime and Thread are fully initialized.

Test: m test-art-host-gtest
Test: testrunner.py --host --gcstress
Bug: 77856493
Change-Id: I8b7a6165fa8e25efd37778e0e6ea049fc2147b24
diff --git a/runtime/gc/collector/concurrent_copying.cc b/runtime/gc/collector/concurrent_copying.cc
index 9f82b04..ae9acd6d 100644
--- a/runtime/gc/collector/concurrent_copying.cc
+++ b/runtime/gc/collector/concurrent_copying.cc
@@ -2611,15 +2611,15 @@
     if (ReadBarrier::kEnableToSpaceInvariantChecks) {
       AssertToSpaceInvariant(nullptr, MemberOffset(0), java_lang_Object_);
     }
-    CHECK_EQ(byte_size, (java_lang_Object_->GetObjectSize<kVerifyNone, kWithoutReadBarrier>()));
+    CHECK_EQ(byte_size, java_lang_Object_->GetObjectSize<kVerifyNone>());
     dummy_obj->SetClass(java_lang_Object_);
     CHECK_EQ(byte_size, (dummy_obj->SizeOf<kVerifyNone>()));
   } else {
     // Use an int array.
     dummy_obj->SetClass(int_array_class);
-    CHECK((dummy_obj->IsArrayInstance<kVerifyNone, kWithoutReadBarrier>()));
+    CHECK(dummy_obj->IsArrayInstance<kVerifyNone>());
     int32_t length = (byte_size - data_offset) / component_size;
-    mirror::Array* dummy_arr = dummy_obj->AsArray<kVerifyNone, kWithoutReadBarrier>();
+    mirror::Array* dummy_arr = dummy_obj->AsArray<kVerifyNone>();
     dummy_arr->SetLength(length);
     CHECK_EQ(dummy_arr->GetLength(), length)
         << "byte_size=" << byte_size << " length=" << length
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index b6877f5..8f064a3 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -1247,7 +1247,7 @@
       CHECK_EQ(image_header.GetImageBegin(), target_base);
       // Fix up dex cache DexFile pointers.
       auto* dex_caches = image_header.GetImageRoot<kWithoutReadBarrier>(ImageHeader::kDexCaches)->
-          AsObjectArray<mirror::DexCache, kVerifyNone, kWithoutReadBarrier>();
+          AsObjectArray<mirror::DexCache, kVerifyNone>();
       for (int32_t i = 0, count = dex_caches->GetLength(); i < count; ++i) {
         mirror::DexCache* dex_cache = dex_caches->Get<kVerifyNone, kWithoutReadBarrier>(i);
         // Fix up dex cache pointers.
diff --git a/runtime/gc/verification.cc b/runtime/gc/verification.cc
index 5d234ea..2c31c65 100644
--- a/runtime/gc/verification.cc
+++ b/runtime/gc/verification.cc
@@ -58,8 +58,8 @@
     oss << " klass=" << klass;
     if (IsValidClass(klass)) {
       oss << "(" << klass->PrettyClass() << ")";
-      if (klass->IsArrayClass<kVerifyNone, kWithoutReadBarrier>()) {
-        oss << " length=" << obj->AsArray<kVerifyNone, kWithoutReadBarrier>()->GetLength();
+      if (klass->IsArrayClass<kVerifyNone>()) {
+        oss << " length=" << obj->AsArray<kVerifyNone>()->GetLength();
       }
     } else {
       oss << " <invalid address>";