use of com.oracle.svm.jni.hosted.JNICallTrampolineMethod in project graal by oracle.
the class JNIFunctionTablesFeature method prepareCallTrampoline.
private static CFunctionPointer prepareCallTrampoline(CompilationAccessImpl access, CallVariant variant, boolean nonVirtual) {
JNICallTrampolineMethod trampolineMethod = JNIAccessFeature.singleton().getCallTrampolineMethod(variant, nonVirtual);
AnalysisMethod analysisTrampoline = access.getUniverse().getBigBang().getUniverse().lookup(trampolineMethod);
HostedMethod hostedTrampoline = access.getUniverse().lookup(analysisTrampoline);
hostedTrampoline.compilationInfo.setCustomParseFunction(trampolineMethod.createCustomParseFunction());
hostedTrampoline.compilationInfo.setCustomCompileFunction(trampolineMethod.createCustomCompileFunction());
return MethodPointer.factory(hostedTrampoline);
}
use of com.oracle.svm.jni.hosted.JNICallTrampolineMethod in project graal by oracle.
the class JNIAccessFeature method createJavaCallTrampoline.
private static JNICallTrampolineMethod createJavaCallTrampoline(BeforeAnalysisAccessImpl access, CallVariant variant, boolean nonVirtual) {
MetaAccessProvider wrappedMetaAccess = access.getMetaAccess().getWrapped();
ResolvedJavaField field = JNIAccessibleMethod.getCallWrapperField(wrappedMetaAccess, variant, nonVirtual);
access.registerAsAccessed(access.getUniverse().lookup(field));
ResolvedJavaMethod method = JNIJavaCallWrappers.lookupJavaCallTrampoline(wrappedMetaAccess, variant, nonVirtual);
JNICallTrampolineMethod trampoline = new JNICallTrampolineMethod(method, field, nonVirtual);
access.registerAsCompiled(access.getUniverse().lookup(trampoline));
return trampoline;
}
Aggregations