From 87f3fcbd0db352157fc59148e94647ef21b73bce Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 28 Apr 2016 15:52:11 +0100 Subject: Replace String.charAt() with HIR. Replace String.charAt() with HArrayLength, HBoundsCheck and HArrayGet. This allows GVN on the HArrayLength and BCE on the HBoundsCheck as well as using the infrastructure for HArrayGet, i.e. better handling of constant indexes than the old intrinsic and using the HArm64IntermediateAddress. Bug: 28330359 Change-Id: I32bf1da7eeafe82537a60416abf6ac412baa80dc --- compiler/optimizing/code_generator.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/optimizing/code_generator.h') diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 82a54d2ed1..f88ed9176a 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -345,6 +345,11 @@ class CodeGenerator : public DeletableArenaObject { // accessing the String's `count` field in String intrinsics. static uint32_t GetArrayLengthOffset(HArrayLength* array_length); + // Helper that returns the offset of the array's data. + // Note: Besides the normal arrays, we also use the HArrayGet for + // accessing the String's `value` field in String intrinsics. + static uint32_t GetArrayDataOffset(HArrayGet* array_get); + void EmitParallelMoves(Location from1, Location to1, Primitive::Type type1, -- cgit v1.2.3-59-g8ed1b