From db70ce5e788404f36cb5dbb137c6a8f79f34a2a0 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Mon, 12 Dec 2016 11:06:59 -0800 Subject: 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 --- runtime/class_table.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/class_table.h') 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 klass) + REQUIRES_SHARED(Locks::mutator_lock_); + template 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 + 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) -- cgit v1.2.3-59-g8ed1b