summaryrefslogtreecommitdiff
path: root/runtime/class_table-inl.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-inl.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-inl.h')
-rw-r--r--runtime/class_table-inl.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/class_table-inl.h b/runtime/class_table-inl.h
index d07ad33d21..d043af36fe 100644
--- a/runtime/class_table-inl.h
+++ b/runtime/class_table-inl.h
@@ -23,6 +23,7 @@
#include "gc_root-inl.h"
#include "mirror/class.h"
#include "oat_file.h"
+#include "obj_ptr-inl.h"
namespace art {
@@ -93,7 +94,7 @@ inline bool ClassTable::TableSlot::IsNull() const {
}
template<ReadBarrierOption kReadBarrierOption>
-inline mirror::Class* ClassTable::TableSlot::Read() const {
+inline ObjPtr<mirror::Class> ClassTable::TableSlot::Read() const {
const uint32_t before = data_.load(std::memory_order_relaxed);
const ObjPtr<mirror::Class> before_ptr(ExtractPtr(before));
const ObjPtr<mirror::Class> after_ptr(
@@ -103,7 +104,7 @@ inline mirror::Class* ClassTable::TableSlot::Read() const {
// one.
data_.CompareAndSetStrongRelease(before, Encode(after_ptr, MaskHash(before)));
}
- return after_ptr.Ptr();
+ return after_ptr;
}
template<typename Visitor>