private static int CheckArgMode (Proto pt, int r, OpArgMask mode) { switch (mode) { case OpArgMask.OpArgN: if (r!=0) return 0; break; case OpArgMask.OpArgU: break; case OpArgMask.OpArgR: CheckReg(pt, r); break; case OpArgMask.OpArgK: if (!( (ISK(r) != 0) ? INDEXK(r) < pt.sizek : r < pt.maxstacksize)) return 0; break; } return 1; }
private static lu_byte opmode(lu_byte t, lu_byte a, OpArgMask b, OpArgMask c, OpMode m) { return (lu_byte)(((t) << 7) | ((a) << 6) | (((lu_byte)b) << 4) | (((lu_byte)c) << 2) | ((lu_byte)m)); }
private static OpCodeMode M(bool t, bool a, OpArgMask b, OpArgMask c, OpMode op) { return new OpCodeMode { TMode = t, AMode = a, BMode = b, CMode = c, OpMode = op, }; }
private static LuaByteType opmode(LuaByteType t, LuaByteType a, OpArgMask b, OpArgMask c, OpMode m) { return (LuaByteType)(((t) << 7) | ((a) << 6) | (((LuaByteType)b) << 4) | (((LuaByteType)c) << 2) | ((LuaByteType)m)); }
private static lu_byte opmode(lu_byte t, lu_byte a, OpArgMask b, OpArgMask c, OpMode m) { return((lu_byte)(((t) << 7) | ((a) << 6) | (((lu_byte)b) << 4) | (((lu_byte)c) << 2) | ((lu_byte)m))); }
public static byte opmode(int t, int a, OpArgMask b, OpArgMask c, OpMode m) { return((byte)((t << 7) | (a << 6) | ((int)b << 4) | ((int)c << 2) | ((int)m))); }
private static LuaByteType opmode(LuaByteType t, LuaByteType a, OpArgMask b, OpArgMask c, OpMode m) { return((LuaByteType)(((t) << 7) | ((a) << 6) | (((LuaByteType)b) << 4) | (((LuaByteType)c) << 2) | ((LuaByteType)m))); }