diff options
| author | 2017-12-04 11:27:47 +0000 | |
|---|---|---|
| committer | 2017-12-04 11:52:21 +0000 | |
| commit | 0259c24f5e83ab69b259245b645076b864b2e2ca (patch) | |
| tree | 20a12e5d7ac9c1bcbf8f4524583f016a53ae34ca /compiler/optimizing/nodes.h | |
| parent | dc93cac66f1db225474cec5bf0350fd7a148085e (diff) | |
Fix a bug in String.charAt() simplification.
Do not pass method index as a bool flag indicating that the
HBoundsCheck originates from a String.charAt(). This was
working only thanks to the method index unlikely to be 0.
This bug was introduced in
https://android-review.googlesource.com/321573 .
Test: Rely on TreeHugger.
Bug: 30933338
Change-Id: I2a51e478ee145d342af8cd49f9fdec7adffd77ff
Diffstat (limited to 'compiler/optimizing/nodes.h')
| -rw-r--r-- | compiler/optimizing/nodes.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 66d5bfea32..58030df9d4 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -5787,10 +5787,10 @@ class HBoundsCheck FINAL : public HExpression<2> { HBoundsCheck(HInstruction* index, HInstruction* length, uint32_t dex_pc, - bool string_char_at = false) + bool is_string_char_at = false) : HExpression(index->GetType(), SideEffects::CanTriggerGC(), dex_pc) { DCHECK_EQ(DataType::Type::kInt32, DataType::Kind(index->GetType())); - SetPackedFlag<kFlagIsStringCharAt>(string_char_at); + SetPackedFlag<kFlagIsStringCharAt>(is_string_char_at); SetRawInputAt(0, index); SetRawInputAt(1, length); } |