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/graph_visualizer.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'compiler/optimizing/graph_visualizer.cc') diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index 3084a4ff2b..048ef3676e 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -399,6 +399,16 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { << array_length->IsStringLength() << std::noboolalpha; } + void VisitBoundsCheck(HBoundsCheck* bounds_check) OVERRIDE { + StartAttributeStream("is_string_char_at") << std::boolalpha + << bounds_check->IsStringCharAt() << std::noboolalpha; + } + + void VisitArrayGet(HArrayGet* array_get) OVERRIDE { + StartAttributeStream("is_string_char_at") << std::boolalpha + << array_get->IsStringCharAt() << std::noboolalpha; + } + void VisitArraySet(HArraySet* array_set) OVERRIDE { StartAttributeStream("value_can_be_null") << std::boolalpha << array_set->GetValueCanBeNull() << std::noboolalpha; -- cgit v1.2.3