am 957fb893: Merge "ART: Move DexCache arrays to native."

* commit '957fb8930766ae422568e7b1b816159a9e9bc18c':
  ART: Move DexCache arrays to native.
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 0547ce8..3489f3c 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -43,6 +43,11 @@
 static constexpr size_t kMaximumNumberOfHInstructions = 12;
 
 void HInliner::Run() {
+  const CompilerOptions& compiler_options = compiler_driver_->GetCompilerOptions();
+  if ((compiler_options.GetInlineDepthLimit() == 0)
+      || (compiler_options.GetInlineMaxCodeUnits() == 0)) {
+    return;
+  }
   if (graph_->IsDebuggable()) {
     // For simplicity, we currently never inline when the graph is debuggable. This avoids
     // doing some logic in the runtime to discover if a method could have been inlined.
diff --git a/runtime/arch/arm64/instruction_set_features_arm64.cc b/runtime/arch/arm64/instruction_set_features_arm64.cc
index 1f2ce02..395cee8 100644
--- a/runtime/arch/arm64/instruction_set_features_arm64.cc
+++ b/runtime/arch/arm64/instruction_set_features_arm64.cc
@@ -30,7 +30,7 @@
 
   // Look for variants that need a fix for a53 erratum 835769.
   static const char* arm64_variants_with_a53_835769_bug[] = {
-      "default", "generic"  // Pessimistically assume all generic ARM64s are A53s.
+      "default", "generic", "cortex-a53"  // Pessimistically assume all generic ARM64s are A53s.
   };
   bool needs_a53_835769_fix = FindVariantInArray(arm64_variants_with_a53_835769_bug,
                                                  arraysize(arm64_variants_with_a53_835769_bug),
diff --git a/runtime/indirect_reference_table.cc b/runtime/indirect_reference_table.cc
index c9ba6cf..a5b63b4 100644
--- a/runtime/indirect_reference_table.cc
+++ b/runtime/indirect_reference_table.cc
@@ -17,6 +17,7 @@
 #include "indirect_reference_table-inl.h"
 
 #include "jni_internal.h"
+#include "nth_caller_visitor.h"
 #include "reference_table.h"
 #include "runtime.h"
 #include "scoped_thread_state_change.h"
diff --git a/runtime/native/java_lang_reflect_Constructor.cc b/runtime/native/java_lang_reflect_Constructor.cc
index e1e9ceb..45b9484 100644
--- a/runtime/native/java_lang_reflect_Constructor.cc
+++ b/runtime/native/java_lang_reflect_Constructor.cc
@@ -103,10 +103,17 @@
     // If caller is null, then we called from JNI, just avoid the check since JNI avoids most
     // access checks anyways. TODO: Investigate if this the correct behavior.
     if (caller != nullptr && !caller->CanAccess(c.Get())) {
-      soa.Self()->ThrowNewExceptionF(
-          "Ljava/lang/IllegalAccessException;", "%s is not accessible from %s",
-          PrettyClass(c.Get()).c_str(), PrettyClass(caller).c_str());
-      return nullptr;
+      if (PrettyDescriptor(c.Get()) == "dalvik.system.DexPathList$Element") {
+        // b/20699073.
+        LOG(WARNING) << "The dalvik.system.DexPathList$Element constructor is not accessible by "
+                        "default. This is a temporary workaround for backwards compatibility "
+                        "with class-loader hacks. Please update your application.";
+      } else {
+        soa.Self()->ThrowNewExceptionF(
+            "Ljava/lang/IllegalAccessException;", "%s is not accessible from %s",
+            PrettyClass(c.Get()).c_str(), PrettyClass(caller).c_str());
+        return nullptr;
+      }
     }
   }
   if (!Runtime::Current()->GetClassLinker()->EnsureInitialized(soa.Self(), c, true, true)) {
diff --git a/test/004-JniTest/src/Main.java b/test/004-JniTest/src/Main.java
index dd88db0..ee3a3b9 100644
--- a/test/004-JniTest/src/Main.java
+++ b/test/004-JniTest/src/Main.java
@@ -120,7 +120,7 @@
     private static void testRemoveLocalObject() {
         removeLocalObject(new Object());
     }
-
+    
     private static native short shortMethod(short s1, short s2, short s3, short s4, short s5, short s6, short s7,
         short s8, short s9, short s10);