From b7d8e8cf7063fdec1cce6ebd33e33804976bd978 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 17 Sep 2015 15:47:05 +0100 Subject: Optimizing: Do not use range-based loop when inserting elements. When we iterate over the elements of a container and we may insert new elements into that container, it's wrong to use the range-based loop. Bug: 24133462 Change-Id: Iee35fbcf88ed3bcd6155cbeba09bd256032a16be --- compiler/optimizing/nodes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 33c0d88f3d..38f46670a6 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -3028,7 +3028,8 @@ class HInvoke : public HInstruction { : HInstruction( SideEffects::AllExceptGCDependency(), dex_pc), // Assume write/read on all fields/arrays. number_of_arguments_(number_of_arguments), - inputs_(number_of_arguments + number_of_other_inputs, arena->Adapter(kArenaAllocInvokeInputs)), + inputs_(number_of_arguments + number_of_other_inputs, + arena->Adapter(kArenaAllocInvokeInputs)), return_type_(return_type), dex_method_index_(dex_method_index), original_invoke_type_(original_invoke_type), -- cgit v1.2.3-59-g8ed1b