From 1fe5839d10114209a75d1716bd81c353e4096810 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 10 Apr 2019 16:14:56 +0100 Subject: ObjPtr<>-ify ClassTable. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 31113334 Change-Id: Ieced7a452d381e5cacbafc91fd5d7672d9d92c30 --- runtime/class_table.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'runtime/class_table.h') diff --git a/runtime/class_table.h b/runtime/class_table.h index 26cd3ec249..810c09c3ec 100644 --- a/runtime/class_table.h +++ b/runtime/class_table.h @@ -82,7 +82,7 @@ class ClassTable { REQUIRES_SHARED(Locks::mutator_lock_); template - mirror::Class* Read() const REQUIRES_SHARED(Locks::mutator_lock_); + ObjPtr Read() const REQUIRES_SHARED(Locks::mutator_lock_); // NO_THREAD_SAFETY_ANALYSIS since the visitor may require heap bitmap lock. template @@ -170,7 +170,9 @@ class ClassTable { REQUIRES_SHARED(Locks::mutator_lock_); // Update a class in the table with the new class. Returns the existing class which was replaced. - mirror::Class* UpdateClass(const char* descriptor, mirror::Class* new_klass, size_t hash) + ObjPtr UpdateClass(const char* descriptor, + ObjPtr new_klass, + size_t hash) REQUIRES(!lock_) REQUIRES_SHARED(Locks::mutator_lock_); @@ -198,12 +200,12 @@ class ClassTable { 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) + ObjPtr Lookup(const char* descriptor, size_t hash) REQUIRES(!lock_) REQUIRES_SHARED(Locks::mutator_lock_); // Return the first class that matches the descriptor of klass. Returns null if there are none. - mirror::Class* LookupByDescriptor(ObjPtr klass) + ObjPtr LookupByDescriptor(ObjPtr klass) REQUIRES(!lock_) REQUIRES_SHARED(Locks::mutator_lock_); -- cgit v1.2.3-59-g8ed1b