summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2020-09-23 14:47:28 +0100
committerNicolas Geoffray <ngeoffray@google.com>2020-09-23 14:47:28 +0100
commit6d69b52f331f788cbd1f21ffd5b87cb3b39965e4 (patch)
tree2bca1001afb4c3fc45cbb198765c51aa65e45c42 /compiler/optimizing/code_generator.cc
parente407d97b0f25562110511d025058dcefdacca623 (diff)
Move MethodLoadKind out of HInvokeStaticOrDirect.
To prepare for using it in HInvokeInterface. For consistency, also move CodePtrLocation. Test: test.py Change-Id: I84f973764275002e2adb71080ebc833b2bafb975
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc14
1 files changed, 7 insertions, 7 deletions
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);