Revert "Add JIT"

Sorry, run-test crashes on target:
0-05 12:15:51.633 I/DEBUG   (27995): Abort message: 'art/runtime/mirror/art_method.cc:349] Check failed: PcIsWithinQuickCode(reinterpret_cast<uintptr_t>(code), pc) java.lang.Throwable java.lang.Throwable.fillInStackTrace() pc=71e3366b code=0x71e3362d size=ad000000'
10-05 12:15:51.633 I/DEBUG   (27995):     r0 00000000  r1 0000542b  r2 00000006  r3 00000000
10-05 12:15:51.633 I/DEBUG   (27995):     r4 00000006  r5 b6f9addc  r6 00000002  r7 0000010c
10-05 12:15:51.633 I/DEBUG   (27995):     r8 b63fe1e8  r9 be8e1418  sl b6427400  fp b63fcce0
10-05 12:15:51.633 I/DEBUG   (27995):     ip 0000542b  sp be8e1358  lr b6e9a27b  pc b6e9c280  cpsr 40070010
10-05 12:15:51.633 I/DEBUG   (27995): 

Bug: 17950037
This reverts commit 2535abe7d1fcdd0e6aca782b1f1932a703ed50a4.

Change-Id: I6f88849bc6f2befed0c0aaa0b7b2a08c967a83c3
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index 87a29ed..474a066 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -24,7 +24,6 @@
 #include "compiler_callbacks.h"
 #include "dex_file-inl.h"
 #include "dex_instruction-inl.h"
-#include "dex_instruction_utils.h"
 #include "dex_instruction_visitor.h"
 #include "gc/accounting/card_table-inl.h"
 #include "indenter.h"
@@ -112,20 +111,6 @@
   reg_line->MarkAllRegistersAsConflicts(verifier);
 }
 
-MethodVerifier::FailureKind MethodVerifier::VerifyMethod(
-    mirror::ArtMethod* method, bool allow_soft_failures, std::string* error ATTRIBUTE_UNUSED) {
-  Thread* self = Thread::Current();
-  StackHandleScope<3> hs(self);
-  mirror::Class* klass = method->GetDeclaringClass();
-  auto h_dex_cache(hs.NewHandle(klass->GetDexCache()));
-  auto h_class_loader(hs.NewHandle(klass->GetClassLoader()));
-  auto h_method = hs.NewHandle(method);
-  return VerifyMethod(self, method->GetDexMethodIndex(), method->GetDexFile(), h_dex_cache,
-                      h_class_loader, klass->GetClassDef(), method->GetCodeItem(), h_method,
-                      method->GetAccessFlags(), allow_soft_failures, false);
-}
-
-
 MethodVerifier::FailureKind MethodVerifier::VerifyClass(Thread* self,
                                                         mirror::Class* klass,
                                                         bool allow_soft_failures,
@@ -151,7 +136,7 @@
   }
   if (early_failure) {
     *error = "Verifier rejected class " + PrettyDescriptor(klass) + failure_message;
-    if (Runtime::Current()->IsAotCompiler()) {
+    if (Runtime::Current()->IsCompiler()) {
       ClassReference ref(&dex_file, klass->GetDexClassDefIndex());
       Runtime::Current()->GetCompilerCallbacks()->ClassRejected(ref);
     }
@@ -559,7 +544,7 @@
     case VERIFY_ERROR_ACCESS_METHOD:
     case VERIFY_ERROR_INSTANTIATION:
     case VERIFY_ERROR_CLASS_CHANGE:
-      if (Runtime::Current()->IsAotCompiler() || !can_load_classes_) {
+      if (Runtime::Current()->IsCompiler() || !can_load_classes_) {
         // If we're optimistically running verification at compile time, turn NO_xxx, ACCESS_xxx,
         // class change and instantiation errors into soft verification errors so that we re-verify
         // at runtime. We may fail to find or to agree on access because of not yet available class
@@ -583,7 +568,7 @@
       // Hard verification failures at compile time will still fail at runtime, so the class is
       // marked as rejected to prevent it from being compiled.
     case VERIFY_ERROR_BAD_CLASS_HARD: {
-      if (Runtime::Current()->IsAotCompiler()) {
+      if (Runtime::Current()->IsCompiler()) {
         ClassReference ref(dex_file_, dex_file_->GetIndexForClassDef(*class_def_));
         Runtime::Current()->GetCompilerCallbacks()->ClassRejected(ref);
       }
@@ -859,7 +844,7 @@
       result = false;
       break;
   }
-  if (inst->GetVerifyIsRuntimeOnly() && Runtime::Current()->IsAotCompiler() && !verify_to_dump_) {
+  if (inst->GetVerifyIsRuntimeOnly() && Runtime::Current()->IsCompiler() && !verify_to_dump_) {
     Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "opcode only expected at runtime " << inst->Name();
     result = false;
   }
@@ -2827,8 +2812,8 @@
   }
 
   if (have_pending_hard_failure_) {
-    if (Runtime::Current()->IsAotCompiler()) {
-      /* When AOT compiling, check that the last failure is a hard failure */
+    if (Runtime::Current()->IsCompiler()) {
+      /* When compiling, check that the last failure is a hard failure */
       CHECK_EQ(failures_[failures_.size() - 1], VERIFY_ERROR_BAD_CLASS_HARD);
     }
     /* immediate failure, reject class */
@@ -3956,16 +3941,28 @@
 
 mirror::ArtField* MethodVerifier::GetQuickFieldAccess(const Instruction* inst,
                                                       RegisterLine* reg_line) {
-  DCHECK(IsInstructionIGetQuickOrIPutQuick(inst->Opcode())) << inst->Opcode();
+  DCHECK(inst->Opcode() == Instruction::IGET_QUICK ||
+         inst->Opcode() == Instruction::IGET_WIDE_QUICK ||
+         inst->Opcode() == Instruction::IGET_OBJECT_QUICK ||
+         inst->Opcode() == Instruction::IGET_BOOLEAN_QUICK ||
+         inst->Opcode() == Instruction::IGET_BYTE_QUICK ||
+         inst->Opcode() == Instruction::IGET_CHAR_QUICK ||
+         inst->Opcode() == Instruction::IGET_SHORT_QUICK ||
+         inst->Opcode() == Instruction::IPUT_QUICK ||
+         inst->Opcode() == Instruction::IPUT_WIDE_QUICK ||
+         inst->Opcode() == Instruction::IPUT_OBJECT_QUICK ||
+         inst->Opcode() == Instruction::IPUT_BOOLEAN_QUICK ||
+         inst->Opcode() == Instruction::IPUT_BYTE_QUICK ||
+         inst->Opcode() == Instruction::IPUT_CHAR_QUICK ||
+         inst->Opcode() == Instruction::IPUT_SHORT_QUICK);
   const RegType& object_type = reg_line->GetRegisterType(this, inst->VRegB_22c());
   if (!object_type.HasClass()) {
     VLOG(verifier) << "Failed to get mirror::Class* from '" << object_type << "'";
     return nullptr;
   }
   uint32_t field_offset = static_cast<uint32_t>(inst->VRegC_22c());
-  mirror::ArtField* const f = mirror::ArtField::FindInstanceFieldWithOffset(object_type.GetClass(),
-                                                                            field_offset);
-  DCHECK_EQ(f->GetOffset().Uint32Value(), field_offset);
+  mirror::ArtField* f = mirror::ArtField::FindInstanceFieldWithOffset(object_type.GetClass(),
+                                                                      field_offset);
   if (f == nullptr) {
     VLOG(verifier) << "Failed to find instance field at offset '" << field_offset
                    << "' from '" << PrettyDescriptor(object_type.GetClass()) << "'";