summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.h
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2016-04-28 15:52:11 +0100
committerVladimir Marko <vmarko@google.com>2016-06-21 15:17:38 +0100
commit87f3fcbd0db352157fc59148e94647ef21b73bce (patch)
tree5bdeabb246f5de86704333b3fcbccc6e9146d246 /compiler/optimizing/code_generator.h
parentb94b5706f0b8e2e1c7e1db22274f9f4bae0c4b5a (diff)
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
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r--compiler/optimizing/code_generator.h5
1 files changed, 5 insertions, 0 deletions
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<kArenaAllocCodeGenerator> {
// 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,