// UpValue[A][RK(B)] := RK(C) internal static void setTabUp(Instruction i, ref LuaVM vm) { var(a, b, c) = i.ABC(); a += 1; vm.GetRK(b); vm.GetRK(c); vm.SetTable(LuaVM.LuaUpvalueIndex(a)); }
internal static void SetTable(Instruction i, ref LuaVM vm) { var(a, b, c) = i.ABC(); a += 1; vm.GetRK(b); vm.GetRK(c); vm.SetTable(a); }
private static void _binaryArith(Instruction i, LuaVM vm, ArithOp op) { var(a, b, c) = i.ABC(); a += 1; vm.GetRK(b); vm.GetRK(c); vm.Arith(op); vm.Replace(a); }
private 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); }
internal static void setTable(Instruction i, ref LuaVM vm) { var abc = i.ABC(); var a = abc.Item1; var b = abc.Item2; var c = abc.Item3; a += 1; vm.GetRK(b); vm.GetRK(c); vm.SetTable(a); }
private static void Compare(Instruction i, ref LuaVM vm, CompareOp op) { var(a, b, c) = i.ABC(); vm.GetRK(b); vm.GetRK(c); var br = vm.Compare(-2, -1, op) != (a != 0); if (br) { vm.AddPC(1); } vm.Pop(2); }
internal static void _compare(Instruction i, ref LuaVM vm, CompareOp op) { var abc = i.ABC(); var a = abc.Item1; var b = abc.Item2; var c = abc.Item3; vm.GetRK(b); vm.GetRK(c); if (vm.Compare(-2, -1, op) != (a != 0)) { vm.AddPC(1); } vm.Pop(2); }
// 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); }
// R(A+1) := R(B); R(A) := R(B)[RK(C)] internal static void Self(Instruction i, ref LuaVM vm) { var(a, b, c) = i.ABC(); a += 1; b += 1; vm.Copy(b, a + 1); vm.GetRK(c); vm.GetTable(b); vm.Replace(a); }
// 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); }
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); }