Check that we don't accidentally invoke compiled code when -Xint.

The heap poisoning breakge (b/17018234) would have been detected with
this check.

Bug: 17018234
Change-Id: If4827ea1b02396d41012f0955e55c887387a0565
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 3ab4ef8..f31e273 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -2167,6 +2167,24 @@
   return result;
 }
 
+const void* ClassLinker::GetOatMethodQuickCodeFor(mirror::ArtMethod* method) {
+  if (method->IsNative() || method->IsAbstract() || method->IsProxyMethod()) {
+    return nullptr;
+  }
+  bool found;
+  OatFile::OatMethod oat_method = FindOatMethodFor(method, &found);
+  return found ? oat_method.GetQuickCode() : nullptr;
+}
+
+const void* ClassLinker::GetOatMethodPortableCodeFor(mirror::ArtMethod* method) {
+  if (method->IsNative() || method->IsAbstract() || method->IsProxyMethod()) {
+    return nullptr;
+  }
+  bool found;
+  OatFile::OatMethod oat_method = FindOatMethodFor(method, &found);
+  return found ? oat_method.GetPortableCode() : nullptr;
+}
+
 const void* ClassLinker::GetQuickOatCodeFor(const DexFile& dex_file, uint16_t class_def_idx,
                                             uint32_t method_idx) {
   bool found;