ObjPtr<>-ify array allocations.
And remove some unnecessary calls to ObjPtr<>::Ptr().
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: Ie313980f7f23b33b0ccea4fa8d5131d643c59080
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h
index ab50973..8bc7a81 100644
--- a/runtime/mirror/class-inl.h
+++ b/runtime/mirror/class-inl.h
@@ -294,7 +294,7 @@
return GetFieldObject<PointerArray>(OFFSET_OF_OBJECT_MEMBER(Class, vtable_));
}
-inline void Class::SetVTable(PointerArray* new_vtable) {
+inline void Class::SetVTable(ObjPtr<PointerArray> new_vtable) {
SetFieldObject<false>(OFFSET_OF_OBJECT_MEMBER(Class, vtable_), new_vtable);
}
@@ -487,7 +487,7 @@
if (UNLIKELY(!this->CanAccess(dex_access_to))) {
if (throw_on_failure) {
ThrowIllegalAccessErrorClassForMethodDispatch(this,
- dex_access_to.Ptr(),
+ dex_access_to,
method,
throw_invoke_type);
}
@@ -800,7 +800,7 @@
obj = nullptr;
}
}
- return obj.Ptr();
+ return obj;
}
inline ObjPtr<Object> Class::AllocObject(Thread* self) {