diff options
| author | 2018-04-21 03:01:39 +0000 | |
|---|---|---|
| committer | 2018-04-21 03:01:39 +0000 | |
| commit | 9d4633373d152c123c4e63100ea6fb3384a9eb09 (patch) | |
| tree | 6788355fce2f7c1806d6c78efcc8160d2103f267 /compiler/optimizing/nodes.cc | |
| parent | 525f67f0c037204f3384a63c24456acc2b458c86 (diff) | |
| parent | 75ff2c96c37485ff8c74cf9942c0a4bf0710e91c (diff) | |
Merge "Revert "Revert^2: Deopt does not throw""
Diffstat (limited to 'compiler/optimizing/nodes.cc')
| -rw-r--r-- | compiler/optimizing/nodes.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 79bb70b9aa..f784f8f7f3 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -1916,6 +1916,15 @@ const HTryBoundary* HBasicBlock::ComputeTryEntryOfSuccessors() const { } } +bool HBasicBlock::HasThrowingInstructions() const { + for (HInstructionIterator it(GetInstructions()); !it.Done(); it.Advance()) { + if (it.Current()->CanThrow()) { + return true; + } + } + return false; +} + static bool HasOnlyOneInstruction(const HBasicBlock& block) { return block.GetPhis().IsEmpty() && !block.GetInstructions().IsEmpty() |