diff options
| author | 2017-11-03 15:56:22 +0000 | |
|---|---|---|
| committer | 2017-11-03 15:56:22 +0000 | |
| commit | 5f317039d87d74f25d3b0a442072557086742d17 (patch) | |
| tree | 6beae56f543d234b49a2f973dcbeb5f6f0bd2b90 /compiler/driver/compiler_driver.cc | |
| parent | 72627a5f675b1c664beb2ad33d60a1c8dca80826 (diff) | |
| parent | 2b2bef245d5b2c6faa2d6f36da14866b2d8f5e4f (diff) | |
Merge "Refactor DexInstructionIterator"
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
| -rw-r--r-- | compiler/driver/compiler_driver.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 3d4da5edcf..bd78af4f4d 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -737,13 +737,13 @@ static void ResolveConstStrings(Handle<mirror::DexCache> dex_cache, } ClassLinker* const class_linker = Runtime::Current()->GetClassLinker(); - for (const Instruction& inst : code_item->Instructions()) { - switch (inst.Opcode()) { + for (const DexInstructionPcPair& inst : code_item->Instructions()) { + switch (inst->Opcode()) { case Instruction::CONST_STRING: case Instruction::CONST_STRING_JUMBO: { - dex::StringIndex string_index((inst.Opcode() == Instruction::CONST_STRING) - ? inst.VRegB_21c() - : inst.VRegB_31c()); + dex::StringIndex string_index((inst->Opcode() == Instruction::CONST_STRING) + ? inst->VRegB_21c() + : inst->VRegB_31c()); mirror::String* string = class_linker->ResolveString(dex_file, string_index, dex_cache); CHECK(string != nullptr) << "Could not allocate a string when forcing determinism"; break; @@ -2417,14 +2417,14 @@ class InitializeClassVisitor : public CompilationVisitor { if (clinit != nullptr) { const DexFile::CodeItem* code_item = clinit->GetCodeItem(); DCHECK(code_item != nullptr); - for (const Instruction& inst : code_item->Instructions()) { - if (inst.Opcode() == Instruction::CONST_STRING) { + for (const DexInstructionPcPair& inst : code_item->Instructions()) { + if (inst->Opcode() == Instruction::CONST_STRING) { ObjPtr<mirror::String> s = class_linker->ResolveString( - *dex_file, dex::StringIndex(inst.VRegB_21c()), h_dex_cache); + *dex_file, dex::StringIndex(inst->VRegB_21c()), h_dex_cache); CHECK(s != nullptr); - } else if (inst.Opcode() == Instruction::CONST_STRING_JUMBO) { + } else if (inst->Opcode() == Instruction::CONST_STRING_JUMBO) { ObjPtr<mirror::String> s = class_linker->ResolveString( - *dex_file, dex::StringIndex(inst.VRegB_31c()), h_dex_cache); + *dex_file, dex::StringIndex(inst->VRegB_31c()), h_dex_cache); CHECK(s != nullptr); } } |