Add read barriers to the constant roots.

This change makes it possible to concurrently scan the constant roots
(the roots visited by Runtime::VisitConstantRoots()) such as the class
of java.lang.Class by adding read barriers.

Bug: 12687968
Change-Id: If1afea471c4e1093688d2db37b7f1fc2742edeef
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h
index 6205f70..451235c 100644
--- a/runtime/mirror/class-inl.h
+++ b/runtime/mirror/class-inl.h
@@ -511,12 +511,14 @@
   VisitInstanceFieldsReferences<kVisitClass>(klass, visitor);
 }
 
+template<ReadBarrierOption kReadBarrierOption>
 inline bool Class::IsArtFieldClass() const {
-  return this == ArtField::GetJavaLangReflectArtField();
+  return this == ArtField::GetJavaLangReflectArtField<kReadBarrierOption>();
 }
 
+template<ReadBarrierOption kReadBarrierOption>
 inline bool Class::IsArtMethodClass() const {
-  return this == ArtMethod::GetJavaLangReflectArtMethod();
+  return this == ArtMethod::GetJavaLangReflectArtMethod<kReadBarrierOption>();
 }
 
 template<VerifyObjectFlags kVerifyFlags, ReadBarrierOption kReadBarrierOption>