diff options
author | Vladimir Marko <vmarko@google.com> | 2019-03-28 13:18:57 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2019-03-29 09:50:00 +0000 |
commit | d7e9bbf092b5a61048358fd54183526ef12284af (patch) | |
tree | 620cee17c499bdb23217224b0b1332408d725a6e /runtime/entrypoints/quick | |
parent | bb206de72135271e66e58576b1196f3e08d5b6fd (diff) | |
download | art-d7e9bbf092b5a61048358fd54183526ef12284af.tar.gz art-d7e9bbf092b5a61048358fd54183526ef12284af.tar.bz2 art-d7e9bbf092b5a61048358fd54183526ef12284af.zip |
Clean up explicit conversions to ObjPtr<>.
Add an ObjPtr<>::DownCast() overload that takes a plain
pointer and remove unnecessary calls to MakeObjPtr(),
usually preceding DownCast(). Move the MakeObjPtr() to
common_art_test.h .
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: I2a243b6d8f3b2e773396dfc53b659c5f7d9ea44a
Diffstat (limited to 'runtime/entrypoints/quick')
-rw-r--r-- | runtime/entrypoints/quick/quick_trampoline_entrypoints.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc index 00c0a52588..2758a8d142 100644 --- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc @@ -2814,7 +2814,7 @@ extern "C" uint64_t artInvokePolymorphic(mirror::Object* raw_receiver, Thread* s bool success = false; if (resolved_method->GetDeclaringClass() == GetClassRoot<mirror::MethodHandle>(linker)) { Handle<mirror::MethodHandle> method_handle(hs.NewHandle( - ObjPtr<mirror::MethodHandle>::DownCast(MakeObjPtr(receiver_handle.Get())))); + ObjPtr<mirror::MethodHandle>::DownCast(receiver_handle.Get()))); if (intrinsic == Intrinsics::kMethodHandleInvokeExact) { success = MethodHandleInvokeExact(self, *shadow_frame, @@ -2835,7 +2835,7 @@ extern "C" uint64_t artInvokePolymorphic(mirror::Object* raw_receiver, Thread* s } else { DCHECK_EQ(GetClassRoot<mirror::VarHandle>(linker), resolved_method->GetDeclaringClass()); Handle<mirror::VarHandle> var_handle(hs.NewHandle( - ObjPtr<mirror::VarHandle>::DownCast(MakeObjPtr(receiver_handle.Get())))); + ObjPtr<mirror::VarHandle>::DownCast(receiver_handle.Get()))); mirror::VarHandle::AccessMode access_mode = mirror::VarHandle::GetAccessModeByIntrinsic(intrinsic); success = VarHandleInvokeAccessor(self, |