示例#1
0
        public override void ExecuteOpCode(VMStack stack, Instruction instruction)
        {
            var x = stack.VM.Pop();
            var y = stack.VM.Pop();

            stack.VM.Push(y & x);
        }
示例#2
0
 public object Execute()
 {
     while (instructions.Count > Index)
     {
         YeetInstruction   instruction          = instructions[Index];
         YeetOpCodeHandler registredInstruction = RegisteredHandlers[instruction.OpCode];
         registredInstruction.ExecuteInstruction(this, instruction);
     }
     return(VMStack.Count != 0 ? VMStack.Pop() : null);
 }
示例#3
0
 public override void ExecuteOpCode(VMStack stack, Instruction instruction)
 {
     if (stack.VM.Count == 0)
     {
         stack.VM.Push(null);
     }
     else
     {
         stack.VM.Push(stack.VM.Pop());
     }
 }
示例#4
0
 public override void ExecuteOpCode(VMStack stack, Instruction instruction)
 {
     stack.VM.Push((long)instruction.Operand);
 }
示例#5
0
 public abstract void ExecuteOpCode(VMStack stack, Instruction instruction);
示例#6
0
 public override void ExecuteOpCode(VMStack stack, Instruction instruction)
 {
     stack.VM.Push((sbyte)instruction.GetLdcI4Value());
 }
示例#7
0
 public override void ExecuteOpCode(VMStack stack, Instruction instruction)
 {
     stack.VM.Push(-1);
 }