summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2014-07-09 20:31:18 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-07-09 14:50:30 +0000
commitc21dc06adc8c8447561208a3fb72ccf6d0443613 (patch)
treeaadce4d6bb70e549b74b537c6f75617cf533576a
parent68e5f4421001a2ba885d822971c375368520ea8c (diff)
parent8159af6320f7413a9d0fff1e29220c01f29c6e96 (diff)
Merge "ART: Check slow_paths_.Size() every time"
-rw-r--r--compiler/dex/quick/gen_common.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/dex/quick/gen_common.cc b/compiler/dex/quick/gen_common.cc
index dafefea0a3..b31e9a2efa 100644
--- a/compiler/dex/quick/gen_common.cc
+++ b/compiler/dex/quick/gen_common.cc
@@ -766,8 +766,9 @@ void Mir2Lir::GenSget(MIR* mir, RegLocation rl_dest,
// Generate code for all slow paths.
void Mir2Lir::HandleSlowPaths() {
- int n = slow_paths_.Size();
- for (int i = 0; i < n; ++i) {
+ // We should check slow_paths_.Size() every time, because a new slow path
+ // may be created during slowpath->Compile().
+ for (size_t i = 0; i < slow_paths_.Size(); ++i) {
LIRSlowPath* slowpath = slow_paths_.Get(i);
slowpath->Compile();
}