diff options
| author | 2017-01-10 12:10:09 +0000 | |
|---|---|---|
| committer | 2017-01-10 12:10:10 +0000 | |
| commit | fac5c658f17c059c42c75cf8cbfbb0680c591c1d (patch) | |
| tree | 723062bad04905461456f94167165798c11874d4 /compiler/optimizing | |
| parent | c38c429ef1246a7abcfa88dafb6325e06a934b2b (diff) | |
| parent | 431121fb0e1fab93a550e71e1da22d3bf056bd95 (diff) | |
Merge "The HBoundsCheck should be the index input of String.charAt."
Diffstat (limited to 'compiler/optimizing')
| -rw-r--r-- | compiler/optimizing/instruction_simplifier.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc index 439e3b66db..dbafb0b16e 100644 --- a/compiler/optimizing/instruction_simplifier.cc +++ b/compiler/optimizing/instruction_simplifier.cc @@ -1843,11 +1843,11 @@ void InstructionSimplifierVisitor::SimplifyStringCharAt(HInvoke* invoke) { // so create the HArrayLength, HBoundsCheck and HArrayGet. HArrayLength* length = new (arena) HArrayLength(str, dex_pc, /* is_string_length */ true); invoke->GetBlock()->InsertInstructionBefore(length, invoke); - HBoundsCheck* bounds_check = - new (arena) HBoundsCheck(index, length, dex_pc, invoke->GetDexMethodIndex()); + HBoundsCheck* bounds_check = new (arena) HBoundsCheck( + index, length, dex_pc, invoke->GetDexMethodIndex()); invoke->GetBlock()->InsertInstructionBefore(bounds_check, invoke); - HArrayGet* array_get = - new (arena) HArrayGet(str, index, Primitive::kPrimChar, dex_pc, /* is_string_char_at */ true); + HArrayGet* array_get = new (arena) HArrayGet( + str, bounds_check, Primitive::kPrimChar, dex_pc, /* is_string_char_at */ true); invoke->GetBlock()->ReplaceAndRemoveInstructionWith(invoke, array_get); bounds_check->CopyEnvironmentFrom(invoke->GetEnvironment()); GetGraph()->SetHasBoundsChecks(true); |