diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-02-28 15:21:07 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-03-04 16:30:48 +0000 |
commit | 9583fbcf597eff6d0b3c5359b8e8d5f70ed82c40 (patch) | |
tree | 847912709f811adda0fa63e89e4bf8af27769f2e /runtime/image.h | |
parent | 093aad184b4451639951a7e012d9b55cbf8c8a07 (diff) | |
download | art-9583fbcf597eff6d0b3c5359b8e8d5f70ed82c40.zip art-9583fbcf597eff6d0b3c5359b8e8d5f70ed82c40.tar.gz art-9583fbcf597eff6d0b3c5359b8e8d5f70ed82c40.tar.bz2 |
Remove oat file location in the image.
The oat file is now always in the same directory, and has the
same name as the image file. Only difference is the extension.
This also removes the need for host-prefix.
Change-Id: I16d1f7aeb1d58372d41921694664e9c321afc1ad
Diffstat (limited to 'runtime/image.h')
-rw-r--r-- | runtime/image.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/image.h b/runtime/image.h index 246f106..ce2bc58 100644 --- a/runtime/image.h +++ b/runtime/image.h @@ -88,6 +88,16 @@ class PACKED(4) ImageHeader { return RoundUp(image_size_, kPageSize); } + static std::string GetOatLocationFromImageLocation(const std::string& image) { + std::string oat_filename = image; + if (oat_filename.length() <= 3) { + return oat_filename + ".oat"; + } else { + oat_filename.replace(oat_filename.length() - 3, 3, "oat"); + } + return oat_filename; + } + enum ImageRoot { kResolutionMethod, kImtConflictMethod, @@ -95,7 +105,6 @@ class PACKED(4) ImageHeader { kCalleeSaveMethod, kRefsOnlySaveMethod, kRefsAndArgsSaveMethod, - kOatLocation, kDexCaches, kClassRoots, kImageRootsMax, |