summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-02-19 12:27:55 +0000
committer Vladimir Marko <vmarko@google.com> 2016-02-24 11:19:23 +0000
commit944da603cde59a4277f3bbc31d860a90842a1a2a (patch)
tree733bc38a905822097a6a601a1de20b49f54440d3 /compiler/driver/compiler_driver.cc
parent52d9c2f0c584877e9c7f9e859d8068b3a2ccb12f (diff)
ART: Allow method references across oat files for multi-image, 2nd attempt.
These were disabled because we didn't have sufficient information about the multi-image layout when processing link-time patches in OatWriter. This CL refactors the ELF file creation so that the information is available. Also clean up ImageWriter to use oat file indexes instead of filenames and avoid reopening the oat file to retrieve the checksum. Change-Id: Icc7b528deca29da1e473c8f079521a36d6c4892f
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc18
1 files changed, 7 insertions, 11 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 670fe94988..e80730fe11 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -342,12 +342,15 @@ CompilerDriver::CompilerDriver(
Compiler::Kind compiler_kind,
InstructionSet instruction_set,
const InstructionSetFeatures* instruction_set_features,
- bool boot_image, std::unordered_set<std::string>* image_classes,
+ bool boot_image,
+ std::unordered_set<std::string>* image_classes,
std::unordered_set<std::string>* compiled_classes,
std::unordered_set<std::string>* compiled_methods,
- size_t thread_count, bool dump_stats, bool dump_passes,
- CumulativeLogger* timer, int swap_fd,
- const std::unordered_map<const DexFile*, const char*>* dex_to_oat_map,
+ size_t thread_count,
+ bool dump_stats,
+ bool dump_passes,
+ CumulativeLogger* timer,
+ int swap_fd,
const ProfileCompilationInfo* profile_compilation_info)
: compiler_options_(compiler_options),
verification_results_(verification_results),
@@ -374,7 +377,6 @@ CompilerDriver::CompilerDriver(
compiler_context_(nullptr),
support_boot_image_fixup_(instruction_set != kMips && instruction_set != kMips64),
dex_files_for_oat_file_(nullptr),
- dex_file_oat_filename_map_(dex_to_oat_map),
compiled_method_storage_(swap_fd),
profile_compilation_info_(profile_compilation_info) {
DCHECK(compiler_options_ != nullptr);
@@ -1678,12 +1680,6 @@ void CompilerDriver::GetCodeAndMethodForDirectCall(InvokeType* type, InvokeType
use_dex_cache = true;
}
}
- if (!use_dex_cache && IsBootImage()) {
- if (!AreInSameOatFile(&(const_cast<mirror::Class*>(referrer_class)->GetDexFile()),
- &declaring_class->GetDexFile())) {
- use_dex_cache = true;
- }
- }
// The method is defined not within this dex file. We need a dex cache slot within the current
// dex file or direct pointers.
bool must_use_direct_pointers = false;