Refactor DexInstructionIterator
Add a way to get the dex PC for the "for each" use case.
Bug: 67104794
Test: test-art-host
Change-Id: I144c459c9a2a03ec8d56842280338d1f7ce1caf0
diff --git a/compiler/dex/inline_method_analyser.cc b/compiler/dex/inline_method_analyser.cc
index 925863e..518b0ec 100644
--- a/compiler/dex/inline_method_analyser.cc
+++ b/compiler/dex/inline_method_analyser.cc
@@ -302,7 +302,8 @@
uint16_t this_vreg = code_item->registers_size_ - code_item->ins_size_;
uint16_t zero_vreg_mask = 0u;
- for (const Instruction& instruction : code_item->Instructions()) {
+ for (const DexInstructionPcPair& pair : code_item->Instructions()) {
+ const Instruction& instruction = pair.Inst();
if (instruction.Opcode() == Instruction::RETURN_VOID) {
break;
} else if (instruction.Opcode() == Instruction::INVOKE_DIRECT) {