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/dex2oat.cc b/src/dex2oat.cc
index 2a6a220..05ff0c0 100644
--- a/src/dex2oat.cc
+++ b/src/dex2oat.cc
@@ -375,12 +375,12 @@
         reinterpret_cast<std::set<std::pair<uint16_t, const DexFile*> >*>(arg);
     MethodHelper mh;
     for (size_t i = 0; i < c->NumVirtualMethods(); ++i) {
-      Method* m = c->GetVirtualMethod(i);
+      AbstractMethod* m = c->GetVirtualMethod(i);
       mh.ChangeMethod(m);
       ResolveExceptionsForMethod(&mh, *exceptions_to_resolve);
     }
     for (size_t i = 0; i < c->NumDirectMethods(); ++i) {
-      Method* m = c->GetDirectMethod(i);
+      AbstractMethod* m = c->GetDirectMethod(i);
       mh.ChangeMethod(m);
       ResolveExceptionsForMethod(&mh, *exceptions_to_resolve);
     }