< prev index next >
src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java
Print this page
@@ -27,12 +27,10 @@
import static jdk.vm.ci.hotspot.HotSpotVMConfig.config;
import static jdk.vm.ci.hotspot.UnsafeAccess.UNSAFE;
import java.lang.annotation.Annotation;
import java.lang.reflect.Executable;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;
@@ -40,11 +38,10 @@
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.Option;
import jdk.vm.ci.meta.Constant;
import jdk.vm.ci.meta.ConstantPool;
import jdk.vm.ci.meta.DefaultProfilingInfo;
import jdk.vm.ci.meta.ExceptionHandler;
-import jdk.vm.ci.meta.JavaConstant;
import jdk.vm.ci.meta.JavaMethod;
import jdk.vm.ci.meta.JavaType;
import jdk.vm.ci.meta.LineNumberTable;
import jdk.vm.ci.meta.Local;
import jdk.vm.ci.meta.LocalVariableTable;
@@ -695,31 +692,10 @@
public boolean isIntrinsicCandidate() {
return (getFlags() & config().methodFlagsIntrinsicCandidate) != 0;
}
- @Override
- public JavaConstant invoke(JavaConstant receiver, JavaConstant[] arguments) {
- assert !isConstructor();
- Method javaMethod = (Method) toJava();
- javaMethod.setAccessible(true);
-
- Object[] objArguments = new Object[arguments.length];
- for (int i = 0; i < arguments.length; i++) {
- objArguments[i] = HotSpotObjectConstantImpl.asBoxedValue(arguments[i]);
- }
- Object objReceiver = receiver != null && !receiver.isNull() ? ((HotSpotObjectConstantImpl) receiver).object() : null;
-
- try {
- Object objResult = javaMethod.invoke(objReceiver, objArguments);
- return javaMethod.getReturnType() == void.class ? null : HotSpotObjectConstantImpl.forBoxedValue(getSignature().getReturnKind(), objResult);
-
- } catch (IllegalAccessException | InvocationTargetException ex) {
- throw new IllegalArgumentException(ex);
- }
- }
-
/**
* Allocates a compile id for this method by asking the VM for one.
*
* @param entryBCI entry bci
* @return compile id
< prev index next >