Clean up Constructor/Method/Field construction.

Simplify the code by ignoring active transactions. Writing
to fields of a newly allocated object does not need to be
recorded as aborting the transaction removes all references
to the new object and it's unnecessary to roll back writes
to unreachable object's fields.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Change-Id: Ib5cd60c003d2ad3e6a246ff86d6b9288428c60ee
diff --git a/runtime/dex/dex_file_annotations.cc b/runtime/dex/dex_file_annotations.cc
index 24b3a3e..99c56a1 100644
--- a/runtime/dex/dex_file_annotations.cc
+++ b/runtime/dex/dex_file_annotations.cc
@@ -525,21 +525,13 @@
         PointerSize pointer_size = class_linker->GetImagePointerSize();
         set_object = true;
         if (method->IsConstructor()) {
-          if (pointer_size == PointerSize::k64) {
-            element_object = mirror::Constructor::CreateFromArtMethod<PointerSize::k64,
-                kTransactionActive>(self, method);
-          } else {
-            element_object = mirror::Constructor::CreateFromArtMethod<PointerSize::k32,
-                kTransactionActive>(self, method);
-          }
+          element_object = (pointer_size == PointerSize::k64)
+              ? mirror::Constructor::CreateFromArtMethod<PointerSize::k64>(self, method)
+              : mirror::Constructor::CreateFromArtMethod<PointerSize::k32>(self, method);
         } else {
-          if (pointer_size == PointerSize::k64) {
-            element_object = mirror::Method::CreateFromArtMethod<PointerSize::k64,
-                kTransactionActive>(self, method);
-          } else {
-            element_object = mirror::Method::CreateFromArtMethod<PointerSize::k32,
-                kTransactionActive>(self, method);
-          }
+          element_object = (pointer_size == PointerSize::k64)
+              ? mirror::Method::CreateFromArtMethod<PointerSize::k64>(self, method)
+              : mirror::Method::CreateFromArtMethod<PointerSize::k32>(self, method);
         }
         if (element_object == nullptr) {
           return false;
@@ -562,13 +554,9 @@
         }
         set_object = true;
         PointerSize pointer_size = Runtime::Current()->GetClassLinker()->GetImagePointerSize();
-        if (pointer_size == PointerSize::k64) {
-          element_object = mirror::Field::CreateFromArtField<PointerSize::k64,
-              kTransactionActive>(self, field, true);
-        } else {
-          element_object = mirror::Field::CreateFromArtField<PointerSize::k32,
-              kTransactionActive>(self, field, true);
-        }
+        element_object = (pointer_size == PointerSize::k64)
+            ? mirror::Field::CreateFromArtField<PointerSize::k64>(self, field, true)
+            : mirror::Field::CreateFromArtField<PointerSize::k32>(self, field, true);
         if (element_object == nullptr) {
           return false;
         }
@@ -743,15 +731,9 @@
   ObjPtr<mirror::Class> annotation_member_class =
       WellKnownClasses::ToClass(WellKnownClasses::libcore_reflect_AnnotationMember);
   Handle<mirror::Object> new_member(hs.NewHandle(annotation_member_class->AllocObject(self)));
-  ObjPtr<mirror::Method> method_obj_ptr;
-  DCHECK(!Runtime::Current()->IsActiveTransaction());
-  if (pointer_size == PointerSize::k64) {
-    method_obj_ptr = mirror::Method::CreateFromArtMethod<PointerSize::k64, false>(
-        self, annotation_method);
-  } else {
-    method_obj_ptr = mirror::Method::CreateFromArtMethod<PointerSize::k32, false>(
-        self, annotation_method);
-  }
+  ObjPtr<mirror::Method> method_obj_ptr = (pointer_size == PointerSize::k64)
+      ? mirror::Method::CreateFromArtMethod<PointerSize::k64>(self, annotation_method)
+      : mirror::Method::CreateFromArtMethod<PointerSize::k32>(self, annotation_method);
   Handle<mirror::Method> method_object(hs.NewHandle(method_obj_ptr));
 
   if (new_member == nullptr || string_name == nullptr ||