ART: Allow --no-inline-from to specify multiple dex files.

This will allow tests to specify arbitrary dex files from
which we should not inline, in addition to core-oj, so that
we can test the related functionality. Additionally, should
the core-oj.jar core grow beyond a single classes.dex and
require a multi-dex .jar, this change makes sure that we
prevent inlining also from the extra classes<N>.dex files.

Change-Id: I74da4839bf9bb405dd62ad80563bf646a7a65dd9
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 818d50a..c483f33 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -2582,7 +2582,8 @@
                                        const DexFile* inlined_into) const {
   // We're not allowed to inline across dex files if we're the no-inline-from dex file.
   if (inlined_from != inlined_into &&
-      compiler_options_->GetNoInlineFromDexFile() == inlined_from) {
+      compiler_options_->GetNoInlineFromDexFile() != nullptr &&
+      ContainsElement(*compiler_options_->GetNoInlineFromDexFile(), inlined_from)) {
     return false;
   }
 
diff --git a/compiler/driver/compiler_options.cc b/compiler/driver/compiler_options.cc
index 2644528..4f6e922 100644
--- a/compiler/driver/compiler_options.cc
+++ b/compiler/driver/compiler_options.cc
@@ -62,7 +62,7 @@
                                  size_t num_dex_methods_threshold,
                                  size_t inline_depth_limit,
                                  size_t inline_max_code_units,
-                                 const DexFile* no_inline_from,
+                                 const std::vector<const DexFile*>* no_inline_from,
                                  bool include_patch_information,
                                  double top_k_profile_threshold,
                                  bool debuggable,
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index d47fc2a..9d51b75 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -72,7 +72,7 @@
                   size_t num_dex_methods_threshold,
                   size_t inline_depth_limit,
                   size_t inline_max_code_units,
-                  const DexFile* no_inline_from,
+                  const std::vector<const DexFile*>* no_inline_from,
                   bool include_patch_information,
                   double top_k_profile_threshold,
                   bool debuggable,
@@ -220,7 +220,7 @@
     return abort_on_hard_verifier_failure_;
   }
 
-  const DexFile* GetNoInlineFromDexFile() const {
+  const std::vector<const DexFile*>* GetNoInlineFromDexFile() const {
     return no_inline_from_;
   }
 
@@ -257,8 +257,10 @@
   size_t inline_depth_limit_;
   size_t inline_max_code_units_;
 
-  // A dex file from which we should not inline code.
-  const DexFile* no_inline_from_;
+  // Dex files from which we should not inline code.
+  // This is usually a very short list (i.e. a single dex file), so we
+  // prefer vector<> over a lookup-oriented container, such as set<>.
+  const std::vector<const DexFile*>* no_inline_from_;
 
   bool include_patch_information_;
   // When using a profile file only the top K% of the profiled samples will be compiled.