Fix to prevent a dex file from being verified multiple times.
Instead of verifying a dex file whenever one is initialized, they're now
verified when not opened from memory. Also, the way dalvik_system_DexFile
opens dex files has been changed to check for an existing oat file and
get the corresponding dex file from there instead.
Change-Id: I75fc26247150107d628e2c4e364ef8a53fbf9481
diff --git a/src/class_linker.h b/src/class_linker.h
index 8471cbc..10d8305 100644
--- a/src/class_linker.h
+++ b/src/class_linker.h
@@ -251,6 +251,9 @@
const OatFile* FindOatFileForDexFile(const DexFile& dex_file);
const OatFile* FindOatFileFromOatLocation(const std::string& location);
+ // Find a DexFile within an OatFile given a DexFile location
+ const DexFile* FindDexFileFromDexLocation(const std::string& location);
+
// TODO: replace this with multiple methods that allocate the correct managed type.
template <class T>
ObjectArray<T>* AllocObjectArray(size_t length) {