public void Handle(Instruction instruction, CilHandlerContext context) { var length = (int)Primitives.Convert(context.Stack.Pop(), typeof(int)); var arrayType = context.Resolver.Type(new ArrayType((TypeReference)instruction.Operand), context.GenericScope); context.Stack.Push(TypeSupport.CreateArray(arrayType, length)); }
public void Handle(Instruction instruction, CilHandlerContext context) { var converted = Primitives.Convert(context.Stack.Pop(), TypeMap[instruction.OpCode]); context.Stack.Push(converted); }