summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/instruction_simplifier.cc
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2018-09-06 18:13:40 +0000
committerRoland Levillain <rpl@google.com>2018-09-06 19:44:51 +0100
commitd9986ac5946c6fb1fe10b754f6ca0f7e2f098382 (patch)
tree1be30c8d9d6e0528cb433a33db8eb07a4a6ed94d /compiler/optimizing/instruction_simplifier.cc
parent0e840278fb2914678c648021950da9b5d4019468 (diff)
downloadart-d9986ac5946c6fb1fe10b754f6ca0f7e2f098382.tar.gz
art-d9986ac5946c6fb1fe10b754f6ca0f7e2f098382.tar.bz2
art-d9986ac5946c6fb1fe10b754f6ca0f7e2f098382.zip
Revert "Fix String.equals() for moveable String.class."
This reverts commit da283050a1a3ddbb7cefae3f36e8c8c1a6acedb7. Reason for revert: This CL is no longer needed with https://android-review.googlesource.com/737437 which makes the String class non-movable in all cases. Test: art/test.py Bug: 68181300 Bug: 67628039 Change-Id: I414abd79de1e1b0fc43dc3be412fc70598ef3044
Diffstat (limited to 'compiler/optimizing/instruction_simplifier.cc')
-rw-r--r--compiler/optimizing/instruction_simplifier.cc16
1 files changed, 0 insertions, 16 deletions
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc
index 2757f7b719..bb96c211cb 100644
--- a/compiler/optimizing/instruction_simplifier.cc
+++ b/compiler/optimizing/instruction_simplifier.cc
@@ -2146,22 +2146,6 @@ void InstructionSimplifierVisitor::SimplifyStringEquals(HInvoke* instruction) {
ReferenceTypeInfo argument_rti = argument->GetReferenceTypeInfo();
if (argument_rti.IsValid() && argument_rti.IsStringClass()) {
optimizations.SetArgumentIsString();
- } else if (kUseReadBarrier) {
- DCHECK(instruction->GetResolvedMethod() != nullptr);
- DCHECK(instruction->GetResolvedMethod()->GetDeclaringClass()->IsStringClass() ||
- // Object.equals() can be devirtualized to String.equals().
- instruction->GetResolvedMethod()->GetDeclaringClass()->IsObjectClass());
- Runtime* runtime = Runtime::Current();
- // For AOT, we always assume that the boot image shall contain the String.class and
- // we do not need a read barrier for boot image classes as they are non-moveable.
- // For JIT, check if we actually have a boot image; if we do, the String.class
- // should also be non-moveable.
- if (runtime->IsAotCompiler() || runtime->GetHeap()->HasBootImageSpace()) {
- DCHECK(runtime->IsAotCompiler() ||
- !runtime->GetHeap()->IsMovableObject(
- instruction->GetResolvedMethod()->GetDeclaringClass()));
- optimizations.SetNoReadBarrierForStringClass();
- }
}
}
}