summaryrefslogtreecommitdiff
path: root/runtime/class_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/class_table.cc')
-rw-r--r--runtime/class_table.cc38
1 files changed, 0 insertions, 38 deletions
diff --git a/runtime/class_table.cc b/runtime/class_table.cc
index fc2640c2cc..288e312bb1 100644
--- a/runtime/class_table.cc
+++ b/runtime/class_table.cc
@@ -164,44 +164,6 @@ bool ClassTable::Remove(const char* descriptor) {
return false;
}
-uint32_t ClassTable::ClassDescriptorHash::operator()(const TableSlot& slot)
- const {
- std::string temp;
- // No read barrier needed, we're reading a chain of constant references for comparison
- // with null and retrieval of constant primitive data. See ReadBarrierOption.
- return ComputeModifiedUtf8Hash(slot.Read<kWithoutReadBarrier>()->GetDescriptor(&temp));
-}
-
-uint32_t ClassTable::ClassDescriptorHash::operator()(const DescriptorHashPair& pair) const {
- DCHECK_EQ(ComputeModifiedUtf8Hash(pair.first), pair.second);
- return pair.second;
-}
-
-bool ClassTable::ClassDescriptorEquals::operator()(const TableSlot& a, const TableSlot& b) const {
- // No read barrier needed, we're reading a chain of constant references for comparison
- // with null and retrieval of constant primitive data. See ReadBarrierOption.
- if (a.Hash() != b.Hash()) {
- std::string temp;
- DCHECK(!a.Read<kWithoutReadBarrier>()->DescriptorEquals(
- b.Read<kWithoutReadBarrier>()->GetDescriptor(&temp)));
- return false;
- }
- std::string temp;
- return a.Read<kWithoutReadBarrier>()->DescriptorEquals(
- b.Read<kWithoutReadBarrier>()->GetDescriptor(&temp));
-}
-
-bool ClassTable::ClassDescriptorEquals::operator()(const TableSlot& a,
- const DescriptorHashPair& b) const {
- // No read barrier needed, we're reading a chain of constant references for comparison
- // with null and retrieval of constant primitive data. See ReadBarrierOption.
- if (!a.MaskedHashEquals(b.second)) {
- DCHECK(!a.Read<kWithoutReadBarrier>()->DescriptorEquals(b.first));
- return false;
- }
- return a.Read<kWithoutReadBarrier>()->DescriptorEquals(b.first);
-}
-
bool ClassTable::InsertStrongRoot(ObjPtr<mirror::Object> obj) {
WriterMutexLock mu(Thread::Current(), lock_);
DCHECK(obj != nullptr);