Пример #1
0
 private static IReadOnlyList <LNode> EncodeConstrainedCall(ConstrainedCallPrototype value, EncoderState state)
 {
     return(new LNode[]
     {
         state.Encode(value.Callee)
     });
 }
Пример #2
0
 /// <summary>
 /// Creates an instruction that performs a constrained virtual call to
 /// a particular method.
 /// </summary>
 /// <param name="callee">The method to call.</param>
 /// <param name="thisArgument">
 /// The 'this' argument for the constrained method call.
 /// </param>
 /// <param name="arguments">
 /// The argument list for the constrained method call.
 /// </param>
 /// <returns>
 /// A constrained call instruction.
 /// </returns>
 public static Instruction CreateConstrainedCall(
     IMethod callee,
     ValueTag thisArgument,
     IReadOnlyList <ValueTag> arguments)
 {
     return(ConstrainedCallPrototype.Create(callee)
            .Instantiate(thisArgument, arguments));
 }
Пример #3
0
 private static ConstrainedCallPrototype DecodeConstrainedCall(IReadOnlyList <LNode> data, DecoderState state)
 {
     return(ConstrainedCallPrototype.Create(
                state.DecodeMethod(data[0])));
 }