From 91e11c0c840193c6822e66846020b6647de243d5 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 2 Sep 2015 17:03:22 +0100 Subject: Optimizing: Tag basic block allocations with their source. Replace GrowableArray with ArenaVector in HBasicBlock and, to track the source of allocations, assign one new and two Quick's arena allocation types to these vectors. Rename kArenaAllocSuccessor to kArenaAllocSuccessors. Bug: 23736311 Change-Id: I984aef6e615ae2380a532f5c6726af21015f43f5 --- compiler/optimizing/builder.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'compiler/optimizing/builder.cc') diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index 23ab94e5fe..4a9dcdf001 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -396,8 +396,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. @@ -424,8 +424,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 -- cgit v1.2.3-59-g8ed1b