diff options
author | Vladimir Marko <vmarko@google.com> | 2015-06-18 17:40:00 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2015-06-18 19:25:42 +0100 |
commit | 07c6f5a3eb17e08f3f2d850e130896f63c80911f (patch) | |
tree | b154de00da25ccc0284100bb54dc393754a8d925 /compiler | |
parent | e71eb1d7cdc59127b6fcf101230376ce7c892a89 (diff) | |
download | art-07c6f5a3eb17e08f3f2d850e130896f63c80911f.zip art-07c6f5a3eb17e08f3f2d850e130896f63c80911f.tar.gz art-07c6f5a3eb17e08f3f2d850e130896f63c80911f.tar.bz2 |
Quick: Don't expect move-exception in every catch block.
The dalvik bytecode doesn't require a move-exception in
a catch handler that ignores the exception.
Bug: 21873167
(cherry picked from commit 2d1a0a408fd148f7b2a2d670e6942ec3d920f875)
Change-Id: Ia00e5791fabdd1b88e9a63b741600ed63d918703
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/dex/mir_graph.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/dex/mir_graph.cc b/compiler/dex/mir_graph.cc index 9fa5148..920be0b4 100644 --- a/compiler/dex/mir_graph.cc +++ b/compiler/dex/mir_graph.cc @@ -398,12 +398,13 @@ bool MIRGraph::IsBadMonitorExitCatch(NarrowDexOffset monitor_exit_offset, DCHECK(monitor_exit->Opcode() == Instruction::MONITOR_EXIT); int monitor_reg = monitor_exit->VRegA_11x(); const Instruction* check_insn = Instruction::At(current_code_item_->insns_ + catch_offset); - DCHECK(check_insn->Opcode() == Instruction::MOVE_EXCEPTION); - if (check_insn->VRegA_11x() == monitor_reg) { - // Unexpected move-exception to the same register. Probably not the pattern we're looking for. - return false; + if (check_insn->Opcode() == Instruction::MOVE_EXCEPTION) { + if (check_insn->VRegA_11x() == monitor_reg) { + // Unexpected move-exception to the same register. Probably not the pattern we're looking for. + return false; + } + check_insn = check_insn->Next(); } - check_insn = check_insn->Next(); while (true) { int dest = -1; bool wide = false; |