Esempio n. 1
0
 private static AllocaArrayPrototype DecodeAllocaArray(IReadOnlyList <LNode> data, DecoderState state)
 {
     return(AllocaArrayPrototype.Create(state.DecodeType(data[0])));
 }
 /// <summary>
 /// Creates an instruction that allocates storage on the stack
 /// for a variable number of elements of a particular type.
 /// </summary>
 /// <param name="elementType">
 /// The type of value to allocate storage for.
 /// </param>
 /// <param name="elementCount">
 /// The number of elements to allocate storage for.
 /// </param>
 /// <returns>
 /// An alloca-array instruction.
 /// </returns>
 public static Instruction CreateAllocaArray(
     IType elementType, ValueTag elementCount)
 {
     return(AllocaArrayPrototype.Create(elementType).Instantiate(elementCount));
 }