From 6d69b52f331f788cbd1f21ffd5b87cb3b39965e4 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 23 Sep 2020 14:47:28 +0100 Subject: Move MethodLoadKind out of HInvokeStaticOrDirect. To prepare for using it in HInvokeInterface. For consistency, also move CodePtrLocation. Test: test.py Change-Id: I84f973764275002e2adb71080ebc833b2bafb975 --- compiler/optimizing/code_generator.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 4f1ab75d82..9ff1f73de4 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -504,19 +504,19 @@ void CodeGenerator::CreateCommonInvokeLocationSummary( if (invoke->IsInvokeStaticOrDirect()) { HInvokeStaticOrDirect* call = invoke->AsInvokeStaticOrDirect(); - HInvokeStaticOrDirect::MethodLoadKind method_load_kind = call->GetMethodLoadKind(); - HInvokeStaticOrDirect::CodePtrLocation code_ptr_location = call->GetCodePtrLocation(); - if (code_ptr_location == HInvokeStaticOrDirect::CodePtrLocation::kCallCriticalNative) { + MethodLoadKind method_load_kind = call->GetMethodLoadKind(); + CodePtrLocation code_ptr_location = call->GetCodePtrLocation(); + if (code_ptr_location == CodePtrLocation::kCallCriticalNative) { locations->AddTemp(Location::RequiresRegister()); // For target method. } - if (code_ptr_location == HInvokeStaticOrDirect::CodePtrLocation::kCallCriticalNative || - method_load_kind == HInvokeStaticOrDirect::MethodLoadKind::kRecursive) { + if (code_ptr_location == CodePtrLocation::kCallCriticalNative || + method_load_kind == MethodLoadKind::kRecursive) { // For `kCallCriticalNative` we need the current method as the hidden argument // if we reach the dlsym lookup stub for @CriticalNative. locations->SetInAt(call->GetCurrentMethodIndex(), visitor->GetMethodLocation()); } else { locations->AddTemp(visitor->GetMethodLocation()); - if (method_load_kind == HInvokeStaticOrDirect::MethodLoadKind::kRuntimeCall) { + if (method_load_kind == MethodLoadKind::kRuntimeCall) { locations->SetInAt(call->GetCurrentMethodIndex(), Location::RequiresRegister()); } } @@ -924,7 +924,7 @@ uint32_t CodeGenerator::GetBootImageOffset(HLoadString* load_string) NO_THREAD_S } uint32_t CodeGenerator::GetBootImageOffset(HInvokeStaticOrDirect* invoke) { - DCHECK_EQ(invoke->GetMethodLoadKind(), HInvokeStaticOrDirect::MethodLoadKind::kBootImageRelRo); + DCHECK_EQ(invoke->GetMethodLoadKind(), MethodLoadKind::kBootImageRelRo); ArtMethod* method = invoke->GetResolvedMethod(); DCHECK(method != nullptr); return GetBootImageOffsetImpl(method, ImageHeader::kSectionArtMethods); -- cgit v1.2.3-59-g8ed1b