Exemplo n.º 1
0
        internal static void _binaryArith(Instruction i, LuaVm vm, ArithOp op)
        {
            var abc = i.ABC();
            var a   = abc.Item1 + 1;
            var b   = abc.Item2;
            var c   = abc.Item3;

            vm.GetRK(b);
            vm.GetRK(c);
            vm.Arith(op);
            vm.Replace(a);
        }
Exemplo n.º 2
0
        internal static void _compare(Instruction i, LuaVm vm, CompareOp op)
        {
            var abc = i.ABC();
            var a   = abc.Item1 + 1;
            var b   = abc.Item2 + 1;
            var c   = abc.Item3 + 1;

            vm.GetRK(b);
            vm.GetRK(c);
            if (vm.Compare(-2, -1, op) != (a != 0))
            {
                vm.AddPC(1);
            }

            vm.Pop(2);
        }