OSDN Git Service

Clean up String.indexOf() intrinsics.
authorVladimir Marko <vmarko@google.com>
Tue, 17 May 2016 15:10:20 +0000 (16:10 +0100)
committerVladimir Marko <vmarko@google.com>
Tue, 17 May 2016 15:31:06 +0000 (16:31 +0100)
Additional cleanup after
    https://android-review.googlesource.com/223260

Bug: 28330359
Change-Id: I88def196babec70123896ef581ec8d61bb1b9a9a

compiler/optimizing/intrinsics_arm.cc
compiler/optimizing/intrinsics_arm64.cc
compiler/optimizing/intrinsics_mips.cc
compiler/optimizing/intrinsics_mips64.cc
compiler/optimizing/intrinsics_x86.cc
compiler/optimizing/intrinsics_x86_64.cc

index 4e3ace4..de04175 100644 (file)
@@ -1124,7 +1124,7 @@ static void GenerateVisitStringIndexOf(HInvoke* invoke,
   SlowPathCode* slow_path = nullptr;
   HInstruction* code_point = invoke->InputAt(1);
   if (code_point->IsIntConstant()) {
-    if (static_cast<uint32_t>(invoke->InputAt(1)->AsIntConstant()->GetValue()) >
+    if (static_cast<uint32_t>(code_point->AsIntConstant()->GetValue()) >
         std::numeric_limits<uint16_t>::max()) {
       // Always needs the slow-path. We could directly dispatch to it, but this case should be
       // rare, so for simplicity just put the full slow-path down and branch unconditionally.
index cc5fd65..6cd1726 100644 (file)
@@ -1399,7 +1399,7 @@ static void GenerateVisitStringIndexOf(HInvoke* invoke,
   SlowPathCodeARM64* slow_path = nullptr;
   HInstruction* code_point = invoke->InputAt(1);
   if (code_point->IsIntConstant()) {
-    if (static_cast<uint32_t>(invoke->InputAt(1)->AsIntConstant()->GetValue()) > 0xFFFFU) {
+    if (static_cast<uint32_t>(code_point->AsIntConstant()->GetValue()) > 0xFFFFU) {
       // Always needs the slow-path. We could directly dispatch to it, but this case should be
       // rare, so for simplicity just put the full slow-path down and branch unconditionally.
       slow_path = new (allocator) IntrinsicSlowPathARM64(invoke);
index 20b61f8..fa250a3 100644 (file)
@@ -2072,7 +2072,7 @@ static void GenerateStringIndexOf(HInvoke* invoke,
   SlowPathCodeMIPS* slow_path = nullptr;
   HInstruction* code_point = invoke->InputAt(1);
   if (code_point->IsIntConstant()) {
-    if (!IsUint<16>(invoke->InputAt(1)->AsIntConstant()->GetValue())) {
+    if (!IsUint<16>(code_point->AsIntConstant()->GetValue())) {
       // Always needs the slow-path. We could directly dispatch to it,
       // but this case should be rare, so for simplicity just put the
       // full slow-path down and branch unconditionally.
index 7188e1c..6c4e64e 100644 (file)
@@ -1568,7 +1568,7 @@ static void GenerateStringIndexOf(HInvoke* invoke,
   SlowPathCodeMIPS64* slow_path = nullptr;
   HInstruction* code_point = invoke->InputAt(1);
   if (code_point->IsIntConstant()) {
-    if (!IsUint<16>(invoke->InputAt(1)->AsIntConstant()->GetValue())) {
+    if (!IsUint<16>(code_point->AsIntConstant()->GetValue())) {
       // Always needs the slow-path. We could directly dispatch to it,
       // but this case should be rare, so for simplicity just put the
       // full slow-path down and branch unconditionally.
index d0edeca..99bc40e 100644 (file)
@@ -1422,7 +1422,7 @@ static void GenerateStringIndexOf(HInvoke* invoke,
   SlowPathCode* slow_path = nullptr;
   HInstruction* code_point = invoke->InputAt(1);
   if (code_point->IsIntConstant()) {
-    if (static_cast<uint32_t>(invoke->InputAt(1)->AsIntConstant()->GetValue()) >
+    if (static_cast<uint32_t>(code_point->AsIntConstant()->GetValue()) >
     std::numeric_limits<uint16_t>::max()) {
       // Always needs the slow-path. We could directly dispatch to it, but this case should be
       // rare, so for simplicity just put the full slow-path down and branch unconditionally.
index 4ee2368..06e9cc2 100644 (file)
@@ -1521,7 +1521,7 @@ static void GenerateStringIndexOf(HInvoke* invoke,
   SlowPathCode* slow_path = nullptr;
   HInstruction* code_point = invoke->InputAt(1);
   if (code_point->IsIntConstant()) {
-    if (static_cast<uint32_t>(invoke->InputAt(1)->AsIntConstant()->GetValue()) >
+    if (static_cast<uint32_t>(code_point->AsIntConstant()->GetValue()) >
     std::numeric_limits<uint16_t>::max()) {
       // Always needs the slow-path. We could directly dispatch to it, but this case should be
       // rare, so for simplicity just put the full slow-path down and branch unconditionally.