Beispiel #1
0
 private static LLVMTypeRef MethodPollFunctionType(this ContextWrapper context) => LLVMTypeRef.FunctionType(
     context.VoidType,
     new LLVMTypeRef[]
 {
     context.VoidPointerType(),
     LLVMTypeRef.PointerType(context.ScheduledTaskFunctionType(), 0u),
     context.VoidPointerType()
 },
     false);
 public static LLVMTypeRef PollFunctionType(ContextWrapper context) => LLVMTypeRef.FunctionType(
     context.VoidType,
     new LLVMTypeRef[]
 {
     context.VoidPointerType(),
     LLVMTypeRef.PointerType(context.ScheduledTaskFunctionType(), 0u),
     context.VoidPointerType()
 },
     false);
Beispiel #3
0
 public static LLVMTypeRef WakerType(this ContextWrapper context) => context.StructType(
     new LLVMTypeRef[]
 {
     // task function pointer
     LLVMTypeRef.PointerType(context.ScheduledTaskFunctionType(), 0u),
     // task state
     context.VoidPointerType()
 });
Beispiel #4
0
 internal static LLVMTypeRef CreateLLVMMethodCallPromiseType(this ContextWrapper context, LLVMTypeRef innerType)
 {
     return(context.StructType(new LLVMTypeRef[]
     {
         LLVMTypeRef.PointerType(context.MethodPollFunctionType(), 0u),
         context.VoidPointerType(),
         innerType,
     }));
 }
Beispiel #5
0
 public static LLVMTypeRef GetScheduledTaskType(this ContextWrapper context)
 {
     return(context.GetCachedStructType("scheduled_task", () => new[]
     {
         // task function pointer
         LLVMTypeRef.PointerType(context.ScheduledTaskFunctionType(), 0u),
         // task state
         context.VoidPointerType()
     }));
 }
Beispiel #6
0
 public static LLVMTypeRef ScheduledTaskFunctionType(this ContextWrapper context) => LLVMTypeRef.FunctionType(context.VoidType, new[] { context.VoidPointerType() }, false);
Beispiel #7
0
 public static LLVMValueRef NullVoidPointer(this ContextWrapper context) => LLVMSharp.LLVM.ConstPointerNull(context.VoidPointerType());
Beispiel #8
0
 public static LLVMTypeRef FileHandleType(this ContextWrapper context) => context.StructType(
     new LLVMTypeRef[]
 {
     context.VoidPointerType()
 });