use of com.oracle.truffle.llvm.runtime.NFIContextExtension.UnsupportedNativeTypeException in project sulong by graalvm.
the class LLVMDispatchNode method getSignature.
private String getSignature() {
if (signature == null) {
CompilerDirectives.transferToInterpreterAndInvalidate();
try {
LLVMContext context = getContextReference().get();
NFIContextExtension nfiContextExtension = context.getContextExtension(NFIContextExtension.class);
this.signature = nfiContextExtension.getNativeSignature(type, LLVMCallNode.USER_ARGUMENT_OFFSET);
} catch (UnsupportedNativeTypeException ex) {
throw new AssertionError(ex);
}
}
return signature;
}
use of com.oracle.truffle.llvm.runtime.NFIContextExtension.UnsupportedNativeTypeException in project sulong by graalvm.
the class LLVMNativeDispatchNode method identityFunction.
@TruffleBoundary
protected TruffleObject identityFunction() {
LLVMContext context = getContextReference().get();
NFIContextExtension nfiContextExtension = context.getContextExtension(NFIContextExtension.class);
String signature;
try {
signature = nfiContextExtension.getNativeSignature(type, LLVMCallNode.USER_ARGUMENT_OFFSET);
} catch (UnsupportedNativeTypeException e) {
throw new IllegalStateException(e);
}
return nfiContextExtension.getNativeFunction(context, "@identity", String.format("(POINTER):%s", signature));
}
Aggregations