Avoid unnecessary read barriers in mirror::Class.
Test: m test-art-host-gtest
Test: testrunner.py --host
Change-Id: Id98ebedf185bfc7f31eda506604c072f68b7a084
diff --git a/runtime/mirror/object-inl.h b/runtime/mirror/object-inl.h
index fcb7479..2c2ad9b 100644
--- a/runtime/mirror/object-inl.h
+++ b/runtime/mirror/object-inl.h
@@ -156,7 +156,7 @@
inline bool Object::IsObjectArray() {
// We do not need a read barrier here as the primitive type is constant,
// both from-space and to-space component type classes shall yield the same result.
- constexpr auto kNewFlags = RemoveThisFlags(kVerifyFlags);
+ constexpr VerifyObjectFlags kNewFlags = RemoveThisFlags(kVerifyFlags);
return IsArrayInstance<kVerifyFlags>() &&
!GetClass<kNewFlags, kWithoutReadBarrier>()->
template GetComponentType<kNewFlags, kWithoutReadBarrier>()->IsPrimitive();
@@ -197,7 +197,7 @@
// We do not need a read barrier here as the primitive type is constant,
// both from-space and to-space component type classes shall yield the same result.
ObjPtr<Class> klass = GetClass<kVerifyFlags, kWithoutReadBarrier>();
- constexpr auto kNewFlags = RemoveThisFlags(kVerifyFlags);
+ constexpr VerifyObjectFlags kNewFlags = RemoveThisFlags(kVerifyFlags);
ObjPtr<Class> const component_type = klass->GetComponentType<kNewFlags, kWithoutReadBarrier>();
return component_type != nullptr &&
component_type->GetPrimitiveType<kNewFlags>() == kType;
@@ -340,7 +340,7 @@
// values is OK because of that.
static constexpr ReadBarrierOption kRBO = kWithoutReadBarrier;
size_t result;
- constexpr auto kNewFlags = RemoveThisFlags(kVerifyFlags);
+ constexpr VerifyObjectFlags kNewFlags = RemoveThisFlags(kVerifyFlags);
if (IsArrayInstance<kVerifyFlags>()) {
result = AsArray<kNewFlags>()->template SizeOf<kNewFlags, kRBO>();
} else if (IsClass<kNewFlags>()) {