src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java
changeset 52645 74cf02d5f6e2
parent 52381 7f90bc64b0fc
child 54669 ad45b3802d4e
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java	Wed Nov 21 12:36:16 2018 -0800
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java	Wed Nov 21 22:02:17 2018 +0100
@@ -27,6 +27,7 @@
 import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
 
 import java.lang.reflect.Executable;
+import java.lang.reflect.Field;
 
 import jdk.vm.ci.code.BytecodeFrame;
 import jdk.vm.ci.code.InstalledCode;
@@ -657,4 +658,17 @@
      * Gets the host class for {@code type}.
      */
     native HotSpotResolvedObjectTypeImpl getHostClass(HotSpotResolvedObjectTypeImpl type);
+
+    /**
+     * Gets a {@link Executable} corresponding to {@code method}.
+     */
+    native Executable asReflectionExecutable(HotSpotResolvedJavaMethodImpl method);
+
+    /**
+     * Gets a {@link Field} denoted by {@code holder} and {@code index}.
+     *
+     * @param holder the class in which the requested field is declared
+     * @param fieldIndex the {@code fieldDescriptor::index()} denoting the field
+     */
+    native Field asReflectionField(HotSpotResolvedObjectTypeImpl holder, int fieldIndex);
 }