Example #1
0
        internal static void getTable(Instruction i, ref LuaVM vm)
        {
            var(a, b, c) = i.ABC();
            a           += 1;
            b           += 1;

            vm.GetRK(c);
            vm.GetTable(b);
            vm.Replace(a);
        }
Example #2
0
        // R(A) := UpValue[B][RK(C)]
        internal static void GetTabUp(Instruction i, ref LuaVM vm)
        {
            var(a, b, c) = i.ABC();
            a           += 1;
            b           += 1;

            vm.GetRK(c);
            vm.GetTable(LuaVM.LuaUpvalueIndex(b));
            vm.Replace(a);
        }
Example #3
0
        // R(A+1) := R(B); R(A) := R(B)[RK(C)]
        internal static void self(Instruction i, ref LuaVM vm)
        {
            var abc = i.ABC();
            var a   = abc.Item1 + 1;
            var b   = abc.Item2 + 1;
            var c   = abc.Item3;

            vm.Copy(b, a + 1);
            vm.GetRK(c);
            vm.GetTable(b);
            vm.Replace(a);
        }
Example #4
0
        internal static void getTabUp(Instruction i, ref LuaVM vm)
        {
            var a_c = i.ABC();
            var a   = a_c.Item1 + 1;
            var c   = a_c.Item3;

            vm.PushGlobalTable();
            vm.GetRK(c);
            vm.GetTable(-2);
            vm.Replace(a);
            vm.Pop(1);
        }
Example #5
0
        internal static void getTable(Instruction i, ref LuaVM vm)
        {
            var abc = i.ABC();
            var a   = abc.Item1;
            var b   = abc.Item2;
            var c   = abc.Item3;

            a += 1;
            b += 1;
            vm.GetRK(c);
            vm.GetTable(b);
            vm.Replace(a);
        }