コード例 #1
0
 /// <summary>
 /// Creates an indirect call instruction.
 /// </summary>
 /// <param name="returnType">
 /// The type of value returned by the callee.
 /// </param>
 /// <param name="parameterTypes">
 /// A list of parameter types.
 /// </param>
 /// <param name="callee">
 /// The delegate or function pointer to call.
 /// </param>
 /// <param name="arguments">
 /// The argument list for the call.
 /// </param>
 /// <returns>
 /// An indirect call instruction.
 /// </returns>
 public static Instruction CreateIndirectCall(
     IType returnType,
     IReadOnlyList <IType> parameterTypes,
     ValueTag callee,
     IReadOnlyList <ValueTag> arguments)
 {
     return(IndirectCallPrototype.Create(returnType, parameterTypes)
            .Instantiate(callee, arguments));
 }
コード例 #2
0
 private static IndirectCallPrototype DecodeIndirectCall(IReadOnlyList <LNode> data, DecoderState state)
 {
     return(IndirectCallPrototype.Create(
                state.DecodeType(data[0]),
                data[1].Args.EagerSelect <LNode, IType>(state.DecodeType)));
 }