From ec16f79a4d0aeff319bf52139a0c82de3080d73c Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Wed, 19 Aug 2015 15:04:01 +0100 Subject: ART: Refactor try/catch block info, store exception type This patch replaces HBasicBlock fields storing try/catch info with a single TryCatchInformation data structure, saving memory for the majority of non-try/catch blocks. It also changes builder to store the exception type for catch blocks. Change-Id: Ib3e43f7db247e6915d67c267fc62410420e230c9 --- compiler/optimizing/builder.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/builder.cc') diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index 88414980b8..c4ead5b038 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -306,7 +306,8 @@ void HGraphBuilder::CreateBlocksForTryCatch(const DexFile::CodeItem& code_item) for (; iterator.HasNext(); iterator.Next()) { uint32_t address = iterator.GetHandlerAddress(); HBasicBlock* block = FindOrCreateBlockStartingAt(address); - block->SetIsCatchBlock(); + block->SetTryCatchInformation( + new (arena_) TryCatchInformation(iterator.GetHandlerTypeIndex(), *dex_file_)); } handlers_ptr = iterator.EndDataPointer(); } -- cgit v1.2.3-59-g8ed1b