summaryrefslogtreecommitdiff
path: root/compiler/dex/inline_method_analyser.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2017-10-26 17:10:19 -0700
committer Mathieu Chartier <mathieuc@google.com> 2017-11-01 15:36:21 -0700
commit2b2bef245d5b2c6faa2d6f36da14866b2d8f5e4f (patch)
tree7948ee1d32e211198a595bb7ed35558d22838da8 /compiler/dex/inline_method_analyser.cc
parentf199f1d3a9816edf9282766a8874d894d7bf87c3 (diff)
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
Diffstat (limited to 'compiler/dex/inline_method_analyser.cc')
-rw-r--r--compiler/dex/inline_method_analyser.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/dex/inline_method_analyser.cc b/compiler/dex/inline_method_analyser.cc
index 925863ef0e..518b0ece73 100644
--- a/compiler/dex/inline_method_analyser.cc
+++ b/compiler/dex/inline_method_analyser.cc
@@ -302,7 +302,8 @@ bool DoAnalyseConstructor(const DexFile::CodeItem* code_item,
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) {