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/reflection.cc b/src/reflection.cc
index 7f1d4d1..7d73ae2 100644
--- a/src/reflection.cc
+++ b/src/reflection.cc
@@ -28,7 +28,7 @@
 jobject InvokeMethod(const ScopedObjectAccess& soa, jobject javaMethod, jobject javaReceiver,
                      jobject javaArgs) {
   jmethodID mid = soa.Env()->FromReflectedMethod(javaMethod);
-  Method* m = soa.DecodeMethod(mid);
+  AbstractMethod* m = soa.DecodeMethod(mid);
 
   Class* declaring_class = m->GetDeclaringClass();
   if (!Runtime::Current()->GetClassLinker()->EnsureInitialized(declaring_class, true, true)) {
@@ -243,7 +243,7 @@
   soa.DecodeMethod(m)->Invoke(soa.Self(), NULL, args, &value);
 }
 
-static std::string UnboxingFailureKind(Method* m, int index, Field* f)
+static std::string UnboxingFailureKind(AbstractMethod* m, int index, Field* f)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
   if (m != NULL && index != -1) {
     ++index; // Humans count from 1.
@@ -255,7 +255,7 @@
   return "result";
 }
 
-static bool UnboxPrimitive(Object* o, Class* dst_class, JValue& unboxed_value, Method* m,
+static bool UnboxPrimitive(Object* o, Class* dst_class, JValue& unboxed_value, AbstractMethod* m,
                            int index, Field* f)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
   if (!dst_class->IsPrimitive()) {
@@ -326,7 +326,7 @@
                                boxed_value, unboxed_value);
 }
 
-bool UnboxPrimitiveForArgument(Object* o, Class* dst_class, JValue& unboxed_value, Method* m, size_t index) {
+bool UnboxPrimitiveForArgument(Object* o, Class* dst_class, JValue& unboxed_value, AbstractMethod* m, size_t index) {
   CHECK(m != NULL);
   return UnboxPrimitive(o, dst_class, unboxed_value, m, index, NULL);
 }