summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2015-10-27 15:02:06 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-10-27 15:02:06 +0000
commitcbf3c0f4e8335b460ce2faba3877d4b24fe492a1 (patch)
tree2118db00ced221b5fe55e5bb37738a8535cfa574 /compiler/optimizing/code_generator.cc
parent1af35996afc82bfecb501fc5ecdc0d3350d8a532 (diff)
parentdc151b2346bb8a4fdeed0c06e54c2fca21d59b5d (diff)
Merge "Optimizing: Determine invoke-static/-direct dispatch early."
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index 1c62dfa859..a1bb5e0838 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -379,13 +379,17 @@ void CodeGenerator::CreateCommonInvokeLocationSummary(
if (invoke->IsInvokeStaticOrDirect()) {
HInvokeStaticOrDirect* call = invoke->AsInvokeStaticOrDirect();
- if (call->IsStringInit()) {
- locations->AddTemp(visitor->GetMethodLocation());
- } else if (call->IsRecursive()) {
- locations->SetInAt(call->GetCurrentMethodInputIndex(), visitor->GetMethodLocation());
- } else {
- locations->AddTemp(visitor->GetMethodLocation());
- locations->SetInAt(call->GetCurrentMethodInputIndex(), Location::RequiresRegister());
+ switch (call->GetMethodLoadKind()) {
+ case HInvokeStaticOrDirect::MethodLoadKind::kRecursive:
+ locations->SetInAt(call->GetCurrentMethodInputIndex(), visitor->GetMethodLocation());
+ break;
+ case HInvokeStaticOrDirect::MethodLoadKind::kDexCacheViaMethod:
+ locations->AddTemp(visitor->GetMethodLocation());
+ locations->SetInAt(call->GetCurrentMethodInputIndex(), Location::RequiresRegister());
+ break;
+ default:
+ locations->AddTemp(visitor->GetMethodLocation());
+ break;
}
} else {
locations->AddTemp(visitor->GetMethodLocation());