summaryrefslogtreecommitdiff
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r--compiler/optimizing/builder.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index 7a3aa58149..0a3f083e10 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -398,8 +398,8 @@ void HGraphBuilder::InsertTryBoundaryBlocks(const DexFile::CodeItem& code_item)
// Find predecessors which are not covered by the same TryItem range. Such
// edges enter the try block and will have a TryBoundary inserted.
- for (size_t i = 0; i < try_block->GetPredecessors().Size(); ++i) {
- HBasicBlock* predecessor = try_block->GetPredecessors().Get(i);
+ for (size_t i = 0; i < try_block->GetPredecessors().size(); ++i) {
+ HBasicBlock* predecessor = try_block->GetPredecessor(i);
if (predecessor->IsSingleTryBoundary()) {
// The edge was already split because of an exit from a neighbouring
// TryItem. We split it again and insert an entry point.
@@ -426,8 +426,7 @@ void HGraphBuilder::InsertTryBoundaryBlocks(const DexFile::CodeItem& code_item)
// Find successors which are not covered by the same TryItem range. Such
// edges exit the try block and will have a TryBoundary inserted.
- for (size_t i = 0; i < try_block->GetSuccessors().Size(); ++i) {
- HBasicBlock* successor = try_block->GetSuccessors().Get(i);
+ for (HBasicBlock* successor : try_block->GetSuccessors()) {
if (successor->IsCatchBlock()) {
// A catch block is always considered an entry point into its TryItem.
// We therefore assume this is an exit point, regardless of whether
@@ -479,6 +478,8 @@ bool HGraphBuilder::BuildGraph(const DexFile::CodeItem& code_item) {
graph_->SetEntryBlock(entry_block_);
graph_->SetExitBlock(exit_block_);
+ graph_->SetHasTryCatch(code_item.tries_size_ != 0);
+
InitializeLocals(code_item.registers_size_);
graph_->SetMaximumNumberOfOutVRegs(code_item.outs_size_);