diff options
author | Richard Uhler <ruhler@google.com> | 2015-01-15 09:37:19 -0800 |
---|---|---|
committer | Richard Uhler <ruhler@google.com> | 2015-03-09 14:46:23 -0700 |
commit | 66d874d96d5699bb090c59f47a5a528956ca053e (patch) | |
tree | d59bf83a08fead7d9823230831bea63c9e43a62c /runtime/utils.cc | |
parent | 2cfdabd2bb4833d7092819d27ef08a9e1cdffead (diff) | |
download | art-66d874d96d5699bb090c59f47a5a528956ca053e.tar.gz art-66d874d96d5699bb090c59f47a5a528956ca053e.tar.bz2 art-66d874d96d5699bb090c59f47a5a528956ca053e.zip |
Create OatFileAssistant class for assisting with oat files.
The oat file assistant is used for determining whether dex2oat or
patchoat is needed, for running dex2oat or patchoat as needed to make
an oat file up to date, and to load dex files associated with a given
dex location.
The introduction of the OatFileAssistant class is meant to clean up and
consolidate code related to the management of oat files that was
duplicated and spread across dalvik_system_DexFile.cc and
class_linker.cc.
Bug: 11301553
Change-Id: I0c16027b9bae4570c2c50faa9c14f581c0cbafb8
Diffstat (limited to 'runtime/utils.cc')
-rw-r--r-- | runtime/utils.cc | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/runtime/utils.cc b/runtime/utils.cc index 851ecebb0..8a23ff723 100644 --- a/runtime/utils.cc +++ b/runtime/utils.cc @@ -1508,23 +1508,6 @@ std::string GetSystemImageFilename(const char* location, const InstructionSet is return filename; } -std::string DexFilenameToOdexFilename(const std::string& location, const InstructionSet isa) { - // location = /foo/bar/baz.jar - // odex_location = /foo/bar/<isa>/baz.odex - std::string odex_location(location); - InsertIsaDirectory(isa, &odex_location); - size_t dot_index = odex_location.rfind('.'); - - // The location must have an extension, otherwise it's not clear what we - // should return. - CHECK_NE(dot_index, std::string::npos) << odex_location; - CHECK_EQ(std::string::npos, odex_location.find('/', dot_index)) << odex_location; - - odex_location.resize(dot_index + 1); - odex_location += "odex"; - return odex_location; -} - bool IsZipMagic(uint32_t magic) { return (('P' == ((magic >> 0) & 0xff)) && ('K' == ((magic >> 8) & 0xff))); |