From c6934e36d33ab402b7b51c78d46c319fc33e8ef3 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 10 Apr 2019 11:40:01 +0100 Subject: 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 --- runtime/mirror/class-inl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/mirror/class-inl.h') diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h index 3ee8bfe89b..992c8f3d0e 100644 --- a/runtime/mirror/class-inl.h +++ b/runtime/mirror/class-inl.h @@ -845,7 +845,10 @@ inline bool Class::DescriptorEquals(const char* match) { 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(); } if (klass->IsPrimitive()) { return strcmp(Primitive::Descriptor(klass->GetPrimitiveType()), match) == 0; -- cgit v1.2.3-59-g8ed1b