diff options
Diffstat (limited to 'runtime/class_table.cc')
-rw-r--r-- | runtime/class_table.cc | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/runtime/class_table.cc b/runtime/class_table.cc index cb87ee2f8a..65d976828d 100644 --- a/runtime/class_table.cc +++ b/runtime/class_table.cc @@ -146,24 +146,6 @@ void ClassTable::Insert(ObjPtr<mirror::Class> klass) { classes_.back().InsertWithHash(TableSlot(klass, hash), hash); } -void ClassTable::CopyWithoutLocks(const ClassTable& source_table) { - if (kIsDebugBuild) { - for (ClassSet& class_set : classes_) { - CHECK(class_set.empty()); - } - } - for (const ClassSet& class_set : source_table.classes_) { - for (const TableSlot& slot : class_set) { - classes_.back().insert(slot); - } - } -} - -void ClassTable::InsertWithoutLocks(ObjPtr<mirror::Class> klass) { - const uint32_t hash = TableSlot::HashDescriptor(klass); - classes_.back().InsertWithHash(TableSlot(klass, hash), hash); -} - void ClassTable::InsertWithHash(ObjPtr<mirror::Class> klass, size_t hash) { WriterMutexLock mu(Thread::Current(), lock_); classes_.back().InsertWithHash(TableSlot(klass, hash), hash); @@ -255,26 +237,6 @@ bool ClassTable::InsertOatFileLocked(const OatFile* oat_file) { return true; } -size_t ClassTable::WriteToMemory(uint8_t* ptr) const { - ReaderMutexLock mu(Thread::Current(), lock_); - ClassSet combined; - // Combine all the class sets in case there are multiple, also adjusts load factor back to - // default in case classes were pruned. - for (const ClassSet& class_set : classes_) { - for (const TableSlot& root : class_set) { - combined.insert(root); - } - } - const size_t ret = combined.WriteToMemory(ptr); - // Validity check - if (kIsDebugBuild && ptr != nullptr) { - size_t read_count; - ClassSet class_set(ptr, /*make copy*/false, &read_count); - class_set.Verify(); - } - return ret; -} - size_t ClassTable::ReadFromMemory(uint8_t* ptr) { size_t read_count = 0; AddClassSet(ClassSet(ptr, /*make copy*/false, &read_count)); |