コード例 #1
0
 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));
 }
コード例 #2
0
 public byte[] Serialize(VMBody body, VMInstruction instruction, Offsets helper) =>
 Array.Empty <byte>();
コード例 #3
0
 public byte[] Serialize(VMBody body, VMInstruction instruction, Offsets helper)
 {
     return(new[] { (byte)VMOpCode.Add });
 }
コード例 #4
0
 public VMInstruction Translate(VMBody body, MethodDef method, int index, Offsets helper, out bool success)
 {
     success = true;
     return(new VMInstruction(VMOpCode.Pop));
 }
コード例 #5
0
 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));
 }
コード例 #6
0
ファイル: Branching.cs プロジェクト: xHeaven/MemeVM
 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])));
 }
コード例 #7
0
ファイル: Dup.cs プロジェクト: Lambogames555/MemeVM
 public byte[] Serialize(VMBody body, VMInstruction instruction, Offsets helper) =>
 new[] { (byte)VMOpCode.Dup };