diff options
author | Calin Juravle <calin@google.com> | 2015-08-25 15:42:32 +0100 |
---|---|---|
committer | Calin Juravle <calin@google.com> | 2015-09-17 12:29:51 +0100 |
commit | 175dc732c80e6f2afd83209348124df349290ba8 (patch) | |
tree | 6a5f45136832f73138ced75fcd3c6110b74116ea /compiler/optimizing/code_generator.cc | |
parent | 5d01db1aa7634a012109d43e6403451b76de1daa (diff) |
Support unresolved methods in Optimizing
Change-Id: If2da02b50d2fa668cd58f134a005f1752e7746b1
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r-- | compiler/optimizing/code_generator.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 50108a7275..3c6a41df34 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -388,6 +388,31 @@ void CodeGenerator::CreateCommonInvokeLocationSummary( } } +void CodeGenerator::GenerateInvokeUnresolvedRuntimeCall(HInvokeUnresolved* invoke) { + MoveConstant(invoke->GetLocations()->GetTemp(0), invoke->GetDexMethodIndex()); + + // Initialize to anything to silent compiler warnings. + QuickEntrypointEnum entrypoint = kQuickInvokeStaticTrampolineWithAccessCheck; + switch (invoke->GetOriginalInvokeType()) { + case kStatic: + entrypoint = kQuickInvokeStaticTrampolineWithAccessCheck; + break; + case kDirect: + entrypoint = kQuickInvokeDirectTrampolineWithAccessCheck; + break; + case kVirtual: + entrypoint = kQuickInvokeVirtualTrampolineWithAccessCheck; + break; + case kSuper: + entrypoint = kQuickInvokeSuperTrampolineWithAccessCheck; + break; + case kInterface: + entrypoint = kQuickInvokeInterfaceTrampolineWithAccessCheck; + break; + } + InvokeRuntime(entrypoint, invoke, invoke->GetDexPc(), nullptr); +} + void CodeGenerator::BlockIfInRegister(Location location, bool is_out) const { // The DCHECKS below check that a register is not specified twice in // the summary. The out location can overlap with an input, so we need |