/// <summary> /// UpValue[B] = R(A) /// </summary> public static void SetUpval(Instruction ins, ILuaVM vm) { ins.ABC(out var a, out var b, out _); a += 1; b += 1; vm.Copy(a, vm.LuaUpvalueIndex(b)); }
/// <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)); }