From 702d26018769f9fbc4763c7ed02331aed596ac7d Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Thu, 30 Apr 2015 19:28:21 +0100 Subject: Skip compilation when falling-through out of method code. Bug: 19988134 Change-Id: I68638ce9551848a67af587595f264b51f976df11 --- compiler/optimizing/builder.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/builder.h') diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h index dc6d97eb0c..36503ce43a 100644 --- a/compiler/optimizing/builder.h +++ b/compiler/optimizing/builder.h @@ -88,7 +88,10 @@ class HGraphBuilder : public ValueObject { // the newly created blocks. // As a side effect, also compute the number of dex instructions, blocks, and // branches. - void ComputeBranchTargets(const uint16_t* start, + // Returns true if all the branches fall inside the method code, false otherwise. + // (In normal cases this should always return true but someone can artificially + // create a code unit in which branches fall-through out of it). + bool ComputeBranchTargets(const uint16_t* start, const uint16_t* end, size_t* number_of_branches); void MaybeUpdateCurrentBlock(size_t index); -- cgit v1.2.3-59-g8ed1b