use of com.oracle.truffle.llvm.runtime.interop.LLVMForeignCallNode in project graal by oracle.
the class LLVMFunctionCode method initForeignConstructorCallTarget.
@TruffleBoundary
private void initForeignConstructorCallTarget() {
synchronized (this) {
if (foreignConstructorCallTarget != null) {
return;
}
LLVMLanguage language = LLVMLanguage.get(null);
LLVMSourceFunctionType sourceType = getFunction().getSourceType();
LLVMInteropType interopType = language.getInteropType(sourceType);
LLVMInteropType extractedType = ((LLVMInteropType.Function) interopType).getParameter(0);
if (extractedType instanceof LLVMInteropType.Value) {
LLVMInteropType.Structured structured = ((LLVMInteropType.Value) extractedType).baseType;
LLVMForeignCallNode foreignCall = LLVMForeignConstructorCallNode.create(language, this, interopType, sourceType, structured);
foreignConstructorCallTarget = foreignCall.getCallTarget();
}
}
}
Aggregations