Make DexCache references const.

Clean up after https://android-review.googlesource.com/80446 .

Change-Id: I32dac9d8aa68bb891ec8b551d771f65db7be409d
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h
index 8071d79..a692381 100644
--- a/runtime/mirror/class.h
+++ b/runtime/mirror/class.h
@@ -454,7 +454,7 @@
   // Note that access to field's class is checked and this may require looking up the class
   // referenced by the FieldId in the DexFile in case the declaring class is inaccessible.
   bool CanAccessResolvedField(Class* access_to, ArtField* field,
-                              DexCache& dex_cache, uint32_t field_idx)
+                              const DexCache& dex_cache, uint32_t field_idx)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   bool CheckResolvedFieldAccess(Class* access_to, ArtField* field,
                                 uint32_t field_idx)
@@ -464,7 +464,7 @@
   // Note that access to methods's class is checked and this may require looking up the class
   // referenced by the MethodId in the DexFile in case the declaring class is inaccessible.
   bool CanAccessResolvedMethod(Class* access_to, ArtMethod* resolved_method,
-                               DexCache& dex_cache, uint32_t method_idx)
+                               const DexCache& dex_cache, uint32_t method_idx)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   template <InvokeType throw_invoke_type>
   bool CheckResolvedMethodAccess(Class* access_to, ArtMethod* resolved_method,
@@ -817,11 +817,11 @@
 
   template <bool throw_on_failure, bool use_referrers_cache>
   bool ResolvedFieldAccessTest(Class* access_to, ArtField* field,
-                               uint32_t field_idx, DexCache* dex_cache)
+                               uint32_t field_idx, const DexCache* dex_cache)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   template <bool throw_on_failure, bool use_referrers_cache, InvokeType throw_invoke_type>
   bool ResolvedMethodAccessTest(Class* access_to, ArtMethod* resolved_method,
-                                uint32_t method_idx, DexCache* dex_cache)
+                                uint32_t method_idx, const DexCache* dex_cache)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
   bool Implements(const Class* klass) const