ART: Make method handle runtime code callable from compiler.
Most of this change is moving the existing method handles code, but it
also introduces a new header file, common_dex_operations.h, that has
some operations taken from interpreter_common.{h,cc} that are also used
by method handles (perform call, set field, get field).
Bug: 30550796
Test: m test-art-host
Change-Id: I2235e13770a5562950f2767f65a25ca273479150
diff --git a/runtime/well_known_classes.h b/runtime/well_known_classes.h
index 227996a..371be61 100644
--- a/runtime/well_known_classes.h
+++ b/runtime/well_known_classes.h
@@ -63,6 +63,7 @@
static jclass java_lang_Error;
static jclass java_lang_ExceptionInInitializerError;
static jclass java_lang_IllegalAccessError;
+ static jclass java_lang_invoke_MethodHandle;
static jclass java_lang_NoClassDefFoundError;
static jclass java_lang_Object;
static jclass java_lang_OutOfMemoryError;
@@ -103,6 +104,8 @@
static jmethodID java_lang_Double_valueOf;
static jmethodID java_lang_Float_valueOf;
static jmethodID java_lang_Integer_valueOf;
+ static jmethodID java_lang_invoke_MethodHandle_invoke;
+ static jmethodID java_lang_invoke_MethodHandle_invokeExact;
static jmethodID java_lang_Long_valueOf;
static jmethodID java_lang_ref_FinalizerReference_add;
static jmethodID java_lang_ref_ReferenceQueue_add;