From 175dc732c80e6f2afd83209348124df349290ba8 Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Tue, 25 Aug 2015 15:42:32 +0100 Subject: Support unresolved methods in Optimizing Change-Id: If2da02b50d2fa668cd58f134a005f1752e7746b1 --- compiler/optimizing/code_generator.cc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'compiler/optimizing/code_generator.cc') 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 -- cgit v1.2.3-59-g8ed1b