diff options
author | Calin Juravle <calin@google.com> | 2015-04-30 19:28:21 +0100 |
---|---|---|
committer | Calin Juravle <calin@google.com> | 2015-05-01 14:23:32 +0100 |
commit | 702d26018769f9fbc4763c7ed02331aed596ac7d (patch) | |
tree | 74578ce3cb0abfd2e25c53d7272415c82717e035 /compiler/optimizing/builder.h | |
parent | fd5f56d4604eeeacdf6be5189187b6ef49157280 (diff) | |
download | art-702d26018769f9fbc4763c7ed02331aed596ac7d.tar.gz art-702d26018769f9fbc4763c7ed02331aed596ac7d.tar.bz2 art-702d26018769f9fbc4763c7ed02331aed596ac7d.zip |
Skip compilation when falling-through out of method code.
Bug: 19988134
Change-Id: I68638ce9551848a67af587595f264b51f976df11
Diffstat (limited to 'compiler/optimizing/builder.h')
-rw-r--r-- | compiler/optimizing/builder.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h index dc6d97eb0..36503ce43 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); |