Example #1
0
		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;
		}
Example #2
0
 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));
 }
Example #3
0
		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,
			};
		}
Example #4
0
 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));
 }
Example #5
0
 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)));
 }
Example #6
0
 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)));
 }
Example #7
0
 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)));
 }