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/scoped_thread_state_change.h b/src/scoped_thread_state_change.h
index 68fbf69..c9b353f 100644
--- a/src/scoped_thread_state_change.h
+++ b/src/scoped_thread_state_change.h
@@ -227,7 +227,7 @@
     return reinterpret_cast<jfieldID>(field);
   }
 
-  Method* DecodeMethod(jmethodID mid) const
+  AbstractMethod* DecodeMethod(jmethodID mid) const
       LOCKS_EXCLUDED(JavaVMExt::globals_lock,
                      JavaVMExt::weak_globals_lock)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
@@ -237,10 +237,10 @@
     // TODO: we should make these unique weak globals if Method instances can ever move.
     UNIMPLEMENTED(WARNING);
 #endif
-    return reinterpret_cast<Method*>(mid);
+    return reinterpret_cast<AbstractMethod*>(mid);
   }
 
-  jmethodID EncodeMethod(Method* method) const
+  jmethodID EncodeMethod(AbstractMethod* method) const
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
     Locks::mutator_lock_->AssertSharedHeld();
     DCHECK_EQ(thread_state_, kRunnable);  // Don't work with raw objects in non-runnable states.