Move mirror::ArtMethod to native

Optimizing + quick tests are passing, devices boot.

TODO: Test and fix bugs in mips64.

Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS.
Some of the savings are from removal of virtual methods and direct
methods object arrays.

Bug: 19264997
Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc
index 363c65a..1ed1a64 100644
--- a/runtime/interpreter/interpreter_common.cc
+++ b/runtime/interpreter/interpreter_common.cc
@@ -413,25 +413,19 @@
 #undef EXPLICIT_DO_IPUT_QUICK_ALL_TEMPLATE_DECL
 #undef EXPLICIT_DO_IPUT_QUICK_TEMPLATE_DECL
 
-uint32_t FindNextInstructionFollowingException(Thread* self,
-                                               ShadowFrame& shadow_frame,
-                                               uint32_t dex_pc,
-                                               const instrumentation::Instrumentation* instrumentation) {
+uint32_t FindNextInstructionFollowingException(
+    Thread* self, ShadowFrame& shadow_frame, uint32_t dex_pc,
+    const instrumentation::Instrumentation* instrumentation) {
   self->VerifyStack();
-  StackHandleScope<3> hs(self);
+  StackHandleScope<2> hs(self);
   Handle<mirror::Throwable> exception(hs.NewHandle(self->GetException()));
   if (instrumentation->HasExceptionCaughtListeners()
       && self->IsExceptionThrownByCurrentMethod(exception.Get())) {
     instrumentation->ExceptionCaughtEvent(self, exception.Get());
   }
   bool clear_exception = false;
-  uint32_t found_dex_pc;
-  {
-    Handle<mirror::Class> exception_class(hs.NewHandle(exception->GetClass()));
-    Handle<mirror::ArtMethod> h_method(hs.NewHandle(shadow_frame.GetMethod()));
-    found_dex_pc = mirror::ArtMethod::FindCatchBlock(h_method, exception_class, dex_pc,
-                                                     &clear_exception);
-  }
+  uint32_t found_dex_pc = shadow_frame.GetMethod()->FindCatchBlock(
+      hs.NewHandle(exception->GetClass()), dex_pc, &clear_exception);
   if (found_dex_pc == DexFile::kDexNoIndex) {
     // Exception is not caught by the current method. We will unwind to the
     // caller. Notify any instrumentation listener.
@@ -651,7 +645,7 @@
       UNREACHABLE();
     }
     // Force the use of interpreter when it is required by the debugger.
-    mirror::EntryPointFromInterpreter* entry;
+    EntryPointFromInterpreter* entry;
     if (UNLIKELY(Dbg::IsForcedInterpreterNeededForCalling(self, new_shadow_frame->GetMethod()))) {
       entry = &art::artInterpreterToInterpreterBridge;
     } else {
@@ -668,7 +662,7 @@
     shadow_frame.SetVRegReference(vregC, result->GetL());
     // Overwrite all potential copies of the original result of the new-instance of string with the
     // new result of the StringFactory. Use the verifier to find this set of registers.
-    mirror::ArtMethod* method = shadow_frame.GetMethod();
+    ArtMethod* method = shadow_frame.GetMethod();
     MethodReference method_ref = method->ToMethodReference();
     SafeMap<uint32_t, std::set<uint32_t>> string_init_map;
     SafeMap<uint32_t, std::set<uint32_t>>* string_init_map_ptr;
@@ -788,13 +782,17 @@
       RecordArrayElementsInTransactionImpl(array->AsShortArray(), count);
       break;
     case Primitive::kPrimInt:
-    case Primitive::kPrimFloat:
       RecordArrayElementsInTransactionImpl(array->AsIntArray(), count);
       break;
+    case Primitive::kPrimFloat:
+      RecordArrayElementsInTransactionImpl(array->AsFloatArray(), count);
+      break;
     case Primitive::kPrimLong:
-    case Primitive::kPrimDouble:
       RecordArrayElementsInTransactionImpl(array->AsLongArray(), count);
       break;
+    case Primitive::kPrimDouble:
+      RecordArrayElementsInTransactionImpl(array->AsDoubleArray(), count);
+      break;
     default:
       LOG(FATAL) << "Unsupported primitive type " << primitive_component_type
                  << " in fill-array-data";