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/runtime/runtime.h b/runtime/runtime.h
index ce64510..7b57dda 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -56,6 +56,7 @@
 class MethodVerifier;
 }
 class ClassLinker;
+class CompilerCallbacks;
 class DexFile;
 class InternTable;
 struct JavaVMExt;
@@ -100,7 +101,7 @@
     std::string image_;
     bool check_jni_;
     std::string jni_trace_;
-    bool is_compiler_;
+    CompilerCallbacks* compiler_callbacks_;
     bool is_zygote_;
     bool interpreter_only_;
     bool is_explicit_gc_disabled_;
@@ -148,7 +149,11 @@
       SHARED_TRYLOCK_FUNCTION(true, Locks::mutator_lock_);
 
   bool IsCompiler() const {
-    return is_compiler_;
+    return compiler_callbacks_ != nullptr;
+  }
+
+  CompilerCallbacks* GetCompilerCallbacks() {
+    return compiler_callbacks_;
   }
 
   bool IsZygote() const {
@@ -469,7 +474,7 @@
   // A pointer to the active runtime or NULL.
   static Runtime* instance_;
 
-  bool is_compiler_;
+  CompilerCallbacks* compiler_callbacks_;
   bool is_zygote_;
   bool is_concurrent_gc_enabled_;
   bool is_explicit_gc_disabled_;