Esempio n. 1
0
 private static SizeOfPrototype DecodeSizeOf(IReadOnlyList <LNode> data, DecoderState state)
 {
     return(SizeOfPrototype.Create(state.DecodeType(data[0]), state.DecodeType(data[1])));
 }
Esempio n. 2
0
 /// <summary>
 /// Creates an instruction that measures the size of a type.
 /// </summary>
 /// <param name="measuredType">
 /// The type to measure.
 /// </param>
 /// <param name="resultType">
 /// The type of value to produce.
 /// </param>
 /// <returns>
 /// A sizeof instruction.
 /// </returns>
 public static Instruction CreateSizeOf(IType measuredType, IType resultType)
 {
     return(SizeOfPrototype.Create(measuredType, resultType).Instantiate());
 }