Only honor $inline$ in AOT.

The state of classes is undeterministic when JITting.

Test: test.py
Change-Id: I05325efe325bb4f7759d7af7cd65d362e6945c57
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 142c957..18390cc 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -146,7 +146,10 @@
   //   that this method is actually inlined;
   // - if a method's name contains the substring "$noinline$", do not
   //   inline that method.
-  const bool honor_inlining_directives = IsCompilingWithCoreImage();
+  // We limit this to AOT compilation, as the JIT may or may not inline
+  // depending on the state of classes at runtime.
+  const bool honor_inlining_directives =
+      IsCompilingWithCoreImage() && Runtime::Current()->IsAotCompiler();
 
   // Keep a copy of all blocks when starting the visit.
   ArenaVector<HBasicBlock*> blocks = graph_->GetReversePostOrder();