public VMInstruction Translate(VMBody body, MethodDef method, int index, Offsets helper, out bool success) { helper.Add(index, -1); success = true; return(new VMInstruction(VMOpCode.UNUSED)); }
public byte[] Serialize(VMBody body, VMInstruction instruction, Offsets helper) => Array.Empty <byte>();
public byte[] Serialize(VMBody body, VMInstruction instruction, Offsets helper) { return(new[] { (byte)VMOpCode.Add }); }
public VMInstruction Translate(VMBody body, MethodDef method, int index, Offsets helper, out bool success) { success = true; return(new VMInstruction(VMOpCode.Pop)); }
public VMInstruction Translate(VMBody body, MethodDef method, int index, Offsets helper, out bool success) { success = true; return(new VMInstruction(VMOpCode.Int32, (int)method.Body.Instructions[index].Operand)); }
public VMInstruction Translate(VMBody body, MethodDef method, int index, Offsets helper, out bool success) { success = true; return(new VMInstruction(VMOpCode.Je, method.Body.Instructions.IndexOf(method.Body.Instructions[index]))); }
public byte[] Serialize(VMBody body, VMInstruction instruction, Offsets helper) => new[] { (byte)VMOpCode.Dup };