Change dex cache to be java object instead of array, add pointer to dex file in dex cache.

Generic clean up to facilitate having GDB macros for Pretty* helper functions.

Improved cleanliness of DexCache since having it as an object array was not the best solution.

Fixed a bug in InOrderWalk caused by ResolveType sometimes allocating classes.

Rename C++ Method to AbstractMethod and add two new classes Constructor, Method which both inherit from AbstractMethod.

Rename done to have the C++ code be closer to the java code.

Change-Id: I4995b4c5e47a3822192b08afa24a639d3b1f4da9
diff --git a/src/common_throws.h b/src/common_throws.h
index ca2211f..e0766b6 100644
--- a/src/common_throws.h
+++ b/src/common_throws.h
@@ -27,10 +27,10 @@
 void ThrowNullPointerExceptionForFieldAccess(Field* field, bool is_read)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
-void ThrowNullPointerExceptionForMethodAccess(Method* caller, uint32_t method_idx, InvokeType type)
+void ThrowNullPointerExceptionForMethodAccess(AbstractMethod* caller, uint32_t method_idx, InvokeType type)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
-void ThrowNullPointerExceptionFromDexPC(Method* throw_method, uint32_t dex_pc)
+void ThrowNullPointerExceptionFromDexPC(AbstractMethod* throw_method, uint32_t dex_pc)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
 // IllegalAccessError
@@ -39,41 +39,41 @@
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
 void ThrowIllegalAccessErrorClassForMethodDispatch(Class* referrer, Class* accessed,
-                                                   const Method* caller, const Method* called,
+                                                   const AbstractMethod* caller, const AbstractMethod* called,
                                                    InvokeType type)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
-void ThrowIllegalAccessErrorMethod(Class* referrer, Method* accessed)
+void ThrowIllegalAccessErrorMethod(Class* referrer, AbstractMethod* accessed)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
 void ThrowIllegalAccessErrorField(Class* referrer, Field* accessed)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
-void ThrowIllegalAccessErrorFinalField(const Method* referrer, Field* accessed)
+void ThrowIllegalAccessErrorFinalField(const AbstractMethod* referrer, Field* accessed)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
 // IncompatibleClassChangeError
 
 void ThrowIncompatibleClassChangeError(InvokeType expected_type, InvokeType found_type,
-                                       Method* method, const Method* referrer)
+                                       AbstractMethod* method, const AbstractMethod* referrer)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
-void ThrowIncompatibleClassChangeErrorClassForInterfaceDispatch(const Method* interface_method,
+void ThrowIncompatibleClassChangeErrorClassForInterfaceDispatch(const AbstractMethod* interface_method,
                                                                 Object* this_object,
-                                                                const Method* referrer)
+                                                                const AbstractMethod* referrer)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
 void ThrowIncompatibleClassChangeErrorField(const Field* resolved_field, bool is_static,
-                                            const Method* referrer)
+                                            const AbstractMethod* referrer)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
 // NoSuchMethodError
 
 void ThrowNoSuchMethodError(InvokeType type, Class* c, const StringPiece& name,
-                            const StringPiece& signature, const Method* referrer)
+                            const StringPiece& signature, const AbstractMethod* referrer)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
-void ThrowNoSuchMethodError(uint32_t method_idx, const Method* referrer)
+void ThrowNoSuchMethodError(uint32_t method_idx, const AbstractMethod* referrer)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
 }  // namespace art