Commits

Armin Rigo committed a7f322b

Remove deprecated operations.

Comments (0)

Files changed (1)

pypy/translator/c/src/int.h

 #define OP_INT_NEG_OVF(x,r) \
 	if ((x) == LONG_MIN) FAIL_OVF("integer negate"); \
 	OP_INT_NEG(x,r)
-#define OP_LLONG_NEG_OVF(x,r) \
-	if ((x) == LLONG_MIN) FAIL_OVF("integer negate"); \
-	OP_LLONG_NEG(x,r)
 
 #define OP_INT_ABS(x,r)    r = (x) >= 0 ? x : -(x)
 
 #define OP_INT_ABS_OVF(x,r) \
 	if ((x) == LONG_MIN) FAIL_OVF("integer absolute"); \
 	OP_INT_ABS(x,r)
-#define OP_LLONG_ABS_OVF(x,r) \
-	if ((x) == LLONG_MIN) FAIL_OVF("integer absolute"); \
-	OP_LLONG_ABS(x,r)
 
 /***  binary operations ***/
 
         r = (long)((unsigned long)x + y); \
         if ((r^x) < 0 && (r^y) < 0) FAIL_OVF("integer addition")
 
-#define OP_LLONG_ADD_OVF(x,y,r) \
-        r = (long long)((unsigned long long)x + y); \
-        if ((r^x) < 0 && (r^y) < 0) FAIL_OVF("integer addition")
-
 #define OP_INT_ADD_NONNEG_OVF(x,y,r)  /* y can be assumed >= 0 */ \
         r = (long)((unsigned long)x + y); \
         if ((r&~x) < 0) FAIL_OVF("integer addition")
         r = (long)((unsigned long)x - y); \
         if ((r^x) < 0 && (r^~y) < 0) FAIL_OVF("integer subtraction")
 
-#define OP_LLONG_SUB_OVF(x,y,r) \
-        r = (long long)((unsigned long long)x - y); \
-        if ((r^x) < 0 && (r^~y) < 0) FAIL_OVF("integer subtraction")
-
 #define OP_INT_MUL(x,y,r)     r = (x) * (y)
 
 #if SIZEOF_LONG * 2 <= SIZEOF_LONG_LONG
 	r = op_llong_mul_ovf(x, y)   /* long == long long */
 #endif
 
-#define OP_LLONG_MUL_OVF(x,y,r) \
-	r = op_llong_mul_ovf(x, y)
-
 /* shifting */
 
 /* NB. shifting has same limitations as C: the shift count must be
 	OP_INT_LSHIFT(x,y,r); \
 	if ((x) != Py_ARITHMETIC_RIGHT_SHIFT(long, r, (y))) \
 		FAIL_OVF("x<<y losing bits or changing sign")
-#define OP_LLONG_LSHIFT_OVF(x,y,r) \
-	OP_LLONG_LSHIFT(x,y,r); \
-	if ((x) != Py_ARITHMETIC_RIGHT_SHIFT(PY_LONG_LONG, r, (y))) \
-		FAIL_OVF("x<<y losing bits or changing sign")
 
 /* floor division */
 
 	    { FAIL_OVF("integer division"); r=0; }      \
 	else                                            \
 	    r = (x) / (y)
-#define OP_LLONG_FLOORDIV_OVF(x,y,r)                    \
-	if ((y) == -1 && (x) == LLONG_MIN)              \
-	    { FAIL_OVF("integer division"); r=0; }      \
-	else                                            \
-	    r = (x) / (y)
 
 #define OP_INT_FLOORDIV_ZER(x,y,r)                      \
 	if ((y) == 0)                                   \
 	    { FAIL_ZER("integer division"); r=0; }      \
 	else                                            \
 	    { OP_INT_FLOORDIV_OVF(x,y,r); }
-#define OP_LLONG_FLOORDIV_OVF_ZER(x,y,r)                \
-	if ((y) == 0)                                   \
-	    { FAIL_ZER("integer division"); r=0; }      \
-	else                                            \
-	    { OP_LLONG_FLOORDIV_OVF(x,y,r); }
 
 /* modulus */
 
 	    { FAIL_OVF("integer modulo"); r=0; }        \
 	else                                            \
 	    r = (x) % (y)
-#define OP_LLONG_MOD_OVF(x,y,r)                         \
-	if ((y) == -1 && (x) == LLONG_MIN)              \
-	    { FAIL_OVF("integer modulo"); r=0; }        \
-	else                                            \
-	    r = (x) % (y)
 #define OP_INT_MOD_ZER(x,y,r)                           \
 	if ((y) == 0)                                   \
 	    { FAIL_ZER("integer modulo"); r=0; }        \
 	    { FAIL_ZER("integer modulo"); r=0; }        \
 	else                                            \
 	    { OP_INT_MOD_OVF(x,y,r); }
-#define OP_LLONG_MOD_OVF_ZER(x,y,r)                     \
-	if ((y) == 0)                                   \
-	    { FAIL_ZER("integer modulo"); r=0; }        \
-	else                                            \
-	    { OP_LLONG_MOD_OVF(x,y,r); }
 
 /* bit operations */
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.