From 49bace1ccbec6f12b5b475ccc2ce76e0b666b500 Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Wed, 1 Jul 2015 15:28:26 +0100 Subject: Address additional comments on try-catch CL Extra documentation of try-catch building. Change-Id: I5048c5fcb354c76fa4a60c3d8d21dd216bc9f6cd --- compiler/optimizing/builder.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'compiler/optimizing/builder.h') diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h index 9744a55687..cae762b49f 100644 --- a/compiler/optimizing/builder.h +++ b/compiler/optimizing/builder.h @@ -98,9 +98,19 @@ class HGraphBuilder : public ValueObject { HBasicBlock* FindBlockStartingAt(int32_t dex_pc) const; HBasicBlock* FindOrCreateBlockStartingAt(int32_t dex_pc); + // Returns whether the dex_pc of `block` lies within the given range. bool IsBlockInPcRange(HBasicBlock* block, uint32_t dex_pc_start, uint32_t dex_pc_end); + + // Adds new blocks to `branch_targets_` starting at the limits of TryItems and + // their exception handlers. void CreateBlocksForTryCatch(const DexFile::CodeItem& code_item); + + // Splits edges which cross the boundaries of TryItems, inserts TryBoundary + // instructions and links them to the corresponding catch blocks. void InsertTryBoundaryBlocks(const DexFile::CodeItem& code_item); + + // Splits a single edge, inserting a TryBoundary of given `kind` and linking + // it to exception handlers of `try_item`. void SplitTryBoundaryEdge(HBasicBlock* predecessor, HBasicBlock* successor, HTryBoundary::BoundaryKind kind, -- cgit v1.2.3-59-g8ed1b