Basic implementation of invoke / invoke-polymorphic.

Basic switch interpreter support for invoke-polymorphic. This change
allows for virtual/interface and static invokes on method handles.

Support for direct invokes (including constructors) and field
getters and setters will be added in follow up changes.

Bug: 30550796
Test: make test-art-host

Change-Id: Ieb3a991d974060d930d56467908d5c7c11d0e38e
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h
index 0feb013..6b28110 100644
--- a/runtime/interpreter/interpreter_common.h
+++ b/runtime/interpreter/interpreter_common.h
@@ -123,7 +123,7 @@
 bool DoCall(ArtMethod* called_method, Thread* self, ShadowFrame& shadow_frame,
             const Instruction* inst, uint16_t inst_data, JValue* result);
 
-// Handles invoke-XXX/range instructions.
+// Handles all invoke-XXX/range instructions except for invoke-polymorphic[/range].
 // Returns true on success, otherwise throws an exception and returns false.
 template<InvokeType type, bool is_range, bool do_access_check>
 static inline bool DoInvoke(Thread* self, ShadowFrame& shadow_frame, const Instruction* inst,
@@ -164,6 +164,12 @@
   }
 }
 
+// Performs a signature polymorphic invoke (invoke-polymorphic/invoke-polymorphic-range).
+template<bool is_range, bool do_access_check>
+bool DoInvokePolymorphic(Thread* self, ShadowFrame& shadow_frame,
+                         const Instruction* inst, uint16_t inst_data,
+                         JValue* result);
+
 // Handles invoke-virtual-quick and invoke-virtual-quick-range instructions.
 // Returns true on success, otherwise throws an exception and returns false.
 template<bool is_range>