Exemplo n.º 1
0
 public static CilOpCode Convert(vmOpCode opCode)
 {
     return(opCode switch
     {
         vmOpCode.AClt => CilOpCodes.Clt,
         vmOpCode.ANeg => CilOpCodes.Neg,
         vmOpCode.ANot => CilOpCodes.Not,
         vmOpCode.AAnd => CilOpCodes.And,
         vmOpCode.AShr => CilOpCodes.Shr,
         vmOpCode.AShl => CilOpCodes.Shl,
         vmOpCode.ARem => CilOpCodes.Rem,
         vmOpCode.ACeq => CilOpCodes.Ceq,
         vmOpCode.AMul => CilOpCodes.Mul,
         vmOpCode.ANop => CilOpCodes.Nop,
         vmOpCode.ACgt => CilOpCodes.Cgt,
         vmOpCode.AAdd => CilOpCodes.Add,
         vmOpCode.ASub => CilOpCodes.Sub,
         vmOpCode.ARet => CilOpCodes.Ret,
         vmOpCode.AXor => CilOpCodes.Xor,
         vmOpCode.APop => CilOpCodes.Pop,
         vmOpCode.ALdlen => CilOpCodes.Ldlen,
         vmOpCode.ADup => CilOpCodes.Dup,
         vmOpCode.ADiv => CilOpCodes.Div,
         _ => CilOpCodes.Nop
     });
Exemplo n.º 2
0
 public vmInstruction(vmOpCode opCode, object operand = null)
 {
     OpCode  = opCode;
     Operand = operand;
 }