summaryrefslogtreecommitdiff
path: root/runtime/class_table.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2016-12-12 11:06:59 -0800
committer Mathieu Chartier <mathieuc@google.com> 2016-12-13 10:12:07 -0800
commitdb70ce5e788404f36cb5dbb137c6a8f79f34a2a0 (patch)
treeb291c40e1b6c44f3744404f085706f4b07cbb73c /runtime/class_table.h
parent7d785fca4fd6cf3507aaa807681b3d73ed586c9b (diff)
Address some review comments
Addressed comments in dex cache and class table. Added class table test. Test: mm test-art-host-gtest-class_table_test -j20 Change-Id: I3ec0282247187acb1ec7af25b309501f001a1c3e
Diffstat (limited to 'runtime/class_table.h')
-rw-r--r--runtime/class_table.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/class_table.h b/runtime/class_table.h
index 104871ff21..f27d8093ce 100644
--- a/runtime/class_table.h
+++ b/runtime/class_table.h
@@ -73,6 +73,9 @@ class ClassTable {
return MaskHash(other) == Hash();
}
+ static uint32_t HashDescriptor(ObjPtr<mirror::Class> klass)
+ REQUIRES_SHARED(Locks::mutator_lock_);
+
template<ReadBarrierOption kReadBarrierOption = kWithReadBarrier>
mirror::Class* Read() const REQUIRES_SHARED(Locks::mutator_lock_);
@@ -174,6 +177,10 @@ class ClassTable {
bool Visit(Visitor& visitor)
REQUIRES(!lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
+ template <typename Visitor>
+ bool Visit(const Visitor& visitor)
+ REQUIRES(!lock_)
+ REQUIRES_SHARED(Locks::mutator_lock_);
// Return the first class that matches the descriptor. Returns null if there are none.
mirror::Class* Lookup(const char* descriptor, size_t hash)