Refactor the use of Method by the compiler.

Remove the dependence on the Method object in dex2oat, allowing lazier
resolution.
Introduce new find and iterators in DexFile to simplify common
operations and avoid misuse of class data items.

Change-Id: I39fb8252190f543d89d8b233076355cec310fe08
diff --git a/src/compiler/Compiler.h b/src/compiler/Compiler.h
index 28a689f..917e3fd 100644
--- a/src/compiler/Compiler.h
+++ b/src/compiler/Compiler.h
@@ -17,6 +17,8 @@
 #ifndef ART_SRC_COMPILER_COMPILER_H_
 #define ART_SRC_COMPILER_COMPILER_H_
 
+#include "dex_file.h"
+
 #define COMPILER_TRACED(X)
 #define COMPILER_TRACEE(X)
 
@@ -99,9 +101,9 @@
 void oatArchDump(void);
 bool oatStartup(void);
 void oatShutdown(void);
-CompiledMethod* oatCompileMethod(const Compiler& compiler,
-                                 const Method* method,
-                                 OatInstructionSetType);
+CompiledMethod* oatCompileMethod(const Compiler& compiler, bool is_direct,
+                                 uint32_t method_idx, const art::ClassLoader* class_loader,
+                                 const art::DexFile& dex_file, OatInstructionSetType);
 void oatDumpStats(void);
 void oatScanAllClassPointers(void (*callback)(void* ptr));
 void oatInitializeSSAConversion(struct CompilationUnit* cUnit);