Support for resolving unknown direct/static methods.

If we can't resolve a method we don't know whether it is direct or
static from the dex information (other than the invocation instruction).
Add support for a third type of resolution stub that can discover the
type of the method based on the calling method and PC of the invocation
instruction. Its still unimplemented to look up the instruction and
figure out if the type is static or not.

Change-Id: I8b76e6ba2c946376e7fe287dbcca17bcaab0e133
diff --git a/src/stub_arm.cc b/src/stub_arm.cc
index 772950c..aeee8c8 100644
--- a/src/stub_arm.cc
+++ b/src/stub_arm.cc
@@ -9,7 +9,7 @@
 namespace art {
 namespace arm {
 
-ByteArray* ArmCreateResolutionTrampoline(bool is_static) {
+ByteArray* ArmCreateResolutionTrampoline(Runtime::TrampolineType type) {
   UniquePtr<ArmAssembler> assembler( static_cast<ArmAssembler*>(Assembler::Create(kArm)) );
   RegList save = (1 << R0) | (1 << R1) | (1 << R2) | (1 << R3) | (1 << LR);
 
@@ -25,7 +25,7 @@
   __ LoadFromOffset(kLoadWord, R12, TR,
                     OFFSETOF_MEMBER(Thread, pUnresolvedDirectMethodTrampolineFromCode));
   __ mov(R2, ShifterOperand(TR));  // Pass Thread::Current() in R2
-  __ LoadImmediate(R3, is_static ? 1 : 0);
+  __ LoadImmediate(R3, type);
   __ IncreaseFrameSize(12);        // 3 words of space for alignment
   // Call to unresolved direct method trampoline (method_idx, sp, Thread*, is_static)
   __ blx(R12);