/// <summary> /// UpValue[A][RK(B)] = RK(C) /// </summary> public static void SetTabUp(Instruction ins, ILuaVM vm) { ins.ABC(out var a, out var b, out var c); a += 1; vm.GetRK(b); vm.GetRK(c); vm.SetTable(vm.LuaUpvalueIndex(a)); }
/// <summary> /// R(A)[RK(B)] = RK(C) /// </summary> public static void SetTable(Instruction ins, ILuaVM vm) { ins.ABC(out var a, out var b, out var c); a += 1; vm.GetRK(b); vm.GetRK(c); vm.SetTable(a); }
public static void SetTable(Instruction i, ILuaVM vm) { var(a, b, c) = i.ABC(); a += 1; vm.GetRK(b); vm.GetRK(c); vm.SetTable(a); }
internal static void SetTabUp(Instruction i, ILuaVM vm) { var(a, b, c) = i.ABC(); a += 1; vm.GetRK(b); vm.GetRK(c); vm.SetTable(LuaState.LuaUpvalueIndex(a)); }
private static void BinaryArith(Instruction i, ILuaVM vm, ArithOp op) { var(a, b, c) = i.ABC(); a += 1; vm.GetRK(b); vm.GetRK(c); vm.Arith(op); vm.Replace(a); }
//R(A)[RK(B)] := RK(C) public static void SetTable(int i, ILuaVM vm) { int a = Instruction.GetA(i) + 1; int b = Instruction.GetB(i) + 1; int c = Instruction.GetC(i); vm.GetRK(b); vm.GetRK(c); vm.SetTable(a); }
/// <summary> /// R(A) = RK(B) op RK(C) /// </summary> private static void BinaryArith(Instruction ins, ILuaVM vm, EArithOp op) { ins.ABC(out var a, out var b, out var c); a += 1; vm.GetRK(b); vm.GetRK(c); vm.Arith(op); vm.Replace(a); }
private static void binaryArith(int i, ILuaVM vm, ArithOpEnum op) { int a = Instruction.GetA(i) + 1; int b = Instruction.GetB(i); int c = Instruction.GetC(i); vm.GetRK(b); vm.GetRK(c); vm.Arith(op); vm.Replace(a); }
private static void Compare(Instruction i, ILuaVM vm, CompareOp op) { var(a, b, c) = i.ABC(); vm.GetRK(b); vm.GetRK(c); if (vm.Compare(-2, -1, op) != (a != 0)) { vm.AddPC(1); } vm.Pop(2); }
/// <summary> /// if ((RK(B) op RK(C)) != A) /// pc++ /// </summary> private static void Compare(Instruction ins, ILuaVM vm, ECompOp op) { ins.ABC(out var a, out var b, out var c); vm.GetRK(b); vm.GetRK(c); if (vm.Compare(-2, -1, op) != (a != 0)) { vm.AddPC(1); } vm.Pop(2); }
/// <summary> /// R(A + 1) = R(B) /// R(A) = R(B)[RK(C)] /// </summary> public static void Self(Instruction ins, ILuaVM vm) { ins.ABC(out var a, out var b, out var c); a += 1; b += 1; vm.Copy(b, a + 1); vm.GetRK(c); vm.GetTable(b); vm.Replace(a); }
internal static void Self(Instruction i, ILuaVM 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)] public static void Self(int i, ILuaVM vm) { int a = Instruction.GetA(i) + 1; int b = Instruction.GetB(i) + 1; int c = Instruction.GetC(i); vm.Copy(b, a + 1); vm.GetRK(c); vm.GetTable(b); vm.Replace(a); }