Move compiler code out of method verifier.

We want to detect small methods for inlining at the end of
the method verification. Instead of adding more compiler
code to the runtime, we create a callback from the runtime
into the compiler, so that we can keep the code there.
Additionally, we move the compiler-related code that was
already in the method verifier to the compiler since it
doesn't really belong to the runtime in the first place.

Change-Id: I708ca13227c809e07917ff3879a89722017e83a9
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 7e81849..14bfde6 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -43,6 +43,7 @@
 class DexCompilationUnit;
 class OatWriter;
 class TimingLogger;
+class VerifiedMethodsData;
 
 enum CompilerBackend {
   kQuick,
@@ -90,7 +91,8 @@
   // enabled.  "image_classes" lets the compiler know what classes it
   // can assume will be in the image, with NULL implying all available
   // classes.
-  explicit CompilerDriver(CompilerBackend compiler_backend, InstructionSet instruction_set,
+  explicit CompilerDriver(VerifiedMethodsData* verified_methods_data,
+                          CompilerBackend compiler_backend, InstructionSet instruction_set,
                           InstructionSetFeatures instruction_set_features,
                           bool image, DescriptorSet* image_classes,
                           size_t thread_count, bool dump_stats);
@@ -105,6 +107,10 @@
   void CompileOne(const mirror::ArtMethod* method, TimingLogger& timings)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
+  VerifiedMethodsData* GetVerifiedMethodsData() const {
+    return verified_methods_data_;
+  }
+
   const InstructionSet& GetInstructionSet() const {
     return instruction_set_;
   }
@@ -390,6 +396,8 @@
   std::vector<const PatchInformation*> code_to_patch_;
   std::vector<const PatchInformation*> methods_to_patch_;
 
+  VerifiedMethodsData* verified_methods_data_;
+
   CompilerBackend compiler_backend_;
 
   const InstructionSet instruction_set_;