summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2018-01-04 09:55:13 -0800
committer Mathieu Chartier <mathieuc@google.com> 2018-01-04 15:25:47 -0800
commit6238c8331bf89ce35a377c6475034243a0791f28 (patch)
tree7de5c1baa9bfe88100b73ca055e7fbf4895ba4d5 /compiler/driver/compiler_driver.cc
parenta821bb1a71637dbd2e251795fce26f5f6f937299 (diff)
Remove DexFile direct accesses to CodeItem
Motivation: StandardDexFile and CompactDexFile should be able to a have different layout for code items. Also addressed comments from a previous CL. Bug: 63756964 Test: test-art-host Change-Id: I5ea7a853b8095f68b4443ded0f599f2ac5efbd3a
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 5d4ed4676b..43e0db5671 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -702,7 +702,7 @@ void CompilerDriver::Resolve(jobject class_loader,
// stable order.
static void ResolveConstStrings(Handle<mirror::DexCache> dex_cache,
- const DexFile* dex_file,
+ const DexFile& dex_file,
const DexFile::CodeItem* code_item)
REQUIRES_SHARED(Locks::mutator_lock_) {
if (code_item == nullptr) {
@@ -711,7 +711,7 @@ static void ResolveConstStrings(Handle<mirror::DexCache> dex_cache,
}
ClassLinker* const class_linker = Runtime::Current()->GetClassLinker();
- for (const DexInstructionPcPair& inst : CodeItemInstructionAccessor(dex_file, code_item)) {
+ for (const DexInstructionPcPair& inst : CodeItemInstructionAccessor(&dex_file, code_item)) {
switch (inst->Opcode()) {
case Instruction::CONST_STRING:
case Instruction::CONST_STRING_JUMBO: {
@@ -773,7 +773,7 @@ static void ResolveConstStrings(CompilerDriver* driver,
continue;
}
previous_method_idx = method_idx;
- ResolveConstStrings(dex_cache, dex_file, it.GetMethodCodeItem());
+ ResolveConstStrings(dex_cache, *dex_file, it.GetMethodCodeItem());
it.Next();
}
DCHECK(!it.HasNext());