Avoid some read barriers in ClassTable.
And clean up ClassTable.
Test: m test-art-host-gtest
Test: testrunner.py --host --interpreter
Bug: 119486698
Change-Id: Ie413bc5a56eb548352ae1fed0976b75c44e0c0d4
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h
index 3ee8bfe..992c8f3 100644
--- a/runtime/mirror/class-inl.h
+++ b/runtime/mirror/class-inl.h
@@ -845,7 +845,10 @@
return false;
}
++match;
- klass = klass->GetComponentType();
+ // No read barrier needed, we're reading a chain of constant references for comparison
+ // with null. Then we follow up below with reading constant references to read constant
+ // primitive data in both proxy and non-proxy paths. See ReadBarrierOption.
+ klass = klass->GetComponentType<kDefaultVerifyFlags, kWithoutReadBarrier>();
}
if (klass->IsPrimitive()) {
return strcmp(Primitive::Descriptor(klass->GetPrimitiveType()), match) == 0;