< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GeneratedInvocationPlugin.java

Print this page

        

*** 22,31 **** --- 22,34 ---- */ package org.graalvm.compiler.nodes.graphbuilderconf; + import static jdk.vm.ci.services.Services.IS_BUILDING_NATIVE_IMAGE; + import static jdk.vm.ci.services.Services.IS_IN_NATIVE_IMAGE; + import java.lang.annotation.Annotation; import java.lang.reflect.Method; import org.graalvm.compiler.api.replacements.Fold; import org.graalvm.compiler.debug.GraalError;
*** 64,73 **** --- 67,81 ---- protected boolean checkInjectedArgument(GraphBuilderContext b, ValueNode arg, ResolvedJavaMethod foldAnnotatedMethod) { if (arg.isNullConstant()) { return true; } + if (IS_IN_NATIVE_IMAGE || IS_BUILDING_NATIVE_IMAGE) { + // The reflection here is problematic for SVM. + return true; + } + MetaAccessProvider metaAccess = b.getMetaAccess(); ResolvedJavaMethod executeMethod = metaAccess.lookupJavaMethod(getExecuteMethod()); ResolvedJavaType thisClass = metaAccess.lookupJavaType(getClass()); ResolvedJavaMethod thisExecuteMethod = thisClass.resolveConcreteMethod(executeMethod, thisClass); if (b.getMethod().equals(thisExecuteMethod)) {
< prev index next >