summaryrefslogtreecommitdiff
path: root/runtime/class_table.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2019-04-10 16:14:56 +0100
committer Vladimir Marko <vmarko@google.com> 2019-05-08 08:19:28 +0000
commit1fe5839d10114209a75d1716bd81c353e4096810 (patch)
tree1c4453056b53a1c9f362c697148a6f809690bb71 /runtime/class_table.h
parentc6934e36d33ab402b7b51c78d46c319fc33e8ef3 (diff)
ObjPtr<>-ify ClassTable.
Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 31113334 Change-Id: Ieced7a452d381e5cacbafc91fd5d7672d9d92c30
Diffstat (limited to 'runtime/class_table.h')
-rw-r--r--runtime/class_table.h10
1 files changed, 6 insertions, 4 deletions
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<ReadBarrierOption kReadBarrierOption = kWithReadBarrier>
- mirror::Class* Read() const REQUIRES_SHARED(Locks::mutator_lock_);
+ ObjPtr<mirror::Class> Read() const REQUIRES_SHARED(Locks::mutator_lock_);
// NO_THREAD_SAFETY_ANALYSIS since the visitor may require heap bitmap lock.
template<typename Visitor>
@@ -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<mirror::Class> UpdateClass(const char* descriptor,
+ ObjPtr<mirror::Class> 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<mirror::Class> 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<mirror::Class> klass)
+ ObjPtr<mirror::Class> LookupByDescriptor(ObjPtr<mirror::Class> klass)
REQUIRES(!lock_)
REQUIRES_SHARED(Locks::mutator_lock_);