diff options
| author | 2015-10-29 20:33:53 +0000 | |
|---|---|---|
| committer | 2015-10-29 20:33:53 +0000 | |
| commit | f080d1cc9101813bb15d47f9775e32c86868e462 (patch) | |
| tree | 0288a1fad8a283a3fb896459bfd1a0c8d8dfa6bf /compiler/optimizing/nodes.cc | |
| parent | 8c0e5f1876f9279b5da4f184ccf02c2a090c64a3 (diff) | |
| parent | 5ad27592e2317b4c7932885eff702099f7cbe0f1 (diff) | |
Merge "ART: Enable more passes under try/catch"
am: 5ad27592e2
* commit '5ad27592e2317b4c7932885eff702099f7cbe0f1':
ART: Enable more passes under try/catch
Diffstat (limited to 'compiler/optimizing/nodes.cc')
| -rw-r--r-- | compiler/optimizing/nodes.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 348026551e..4345d55e90 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -1129,6 +1129,14 @@ std::ostream& operator<<(std::ostream& os, const HInstruction::InstructionKind& } void HInstruction::MoveBefore(HInstruction* cursor) { + if (kIsDebugBuild && CanThrowIntoCatchBlock()) { + // Make sure we are not moving a throwing instruction out of its try block. + DCHECK(cursor->GetBlock()->IsTryBlock()); + const HTryBoundary& current_try = block_->GetTryCatchInformation()->GetTryEntry(); + const HTryBoundary& cursor_try = cursor->GetBlock()->GetTryCatchInformation()->GetTryEntry(); + DCHECK(cursor_try.HasSameExceptionHandlersAs(current_try)); + } + next_->previous_ = previous_; if (previous_ != nullptr) { previous_->next_ = next_; |