aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPaul Eggert2015-11-10 12:46:22 -0800
committerPaul Eggert2015-11-10 12:52:26 -0800
commit0e0ea300ff926d3e2f6f4d514d9115f1eecc8ddb (patch)
tree3f7b95a5cf1d1c1fefe0d48b606bf2fcdf2a8a7b /src/lisp.h
parent6c16c9a649ab5a5ea4bec12345fd369752da5dc0 (diff)
downloademacs-0e0ea300ff926d3e2f6f4d514d9115f1eecc8ddb.tar.gz
emacs-0e0ea300ff926d3e2f6f4d514d9115f1eecc8ddb.zip
Move INTEGER_TO_CONS body out of .h file
* src/data.c (INTBIG_TO_LISP): New macro, with most of the contents of the old INTEGER_TO_CONS. (intbig_to_lisp, uintbig_to_lisp): New functions. * src/lisp.h (INTEGER_TO_CONS): Simplify by using EXPR_SIGNED and the new functions. This shrinks code size a bit, and makes it easier to put a breakpoint on handling of large integers.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 784ab18c0ee..c782f0dd003 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3345,17 +3345,9 @@ extern Lisp_Object arithcompare (Lisp_Object num1, Lisp_Object num2,
3345#define INTEGER_TO_CONS(i) \ 3345#define INTEGER_TO_CONS(i) \
3346 (! FIXNUM_OVERFLOW_P (i) \ 3346 (! FIXNUM_OVERFLOW_P (i) \
3347 ? make_number (i) \ 3347 ? make_number (i) \
3348 : ! ((FIXNUM_OVERFLOW_P (INTMAX_MIN >> 16) \ 3348 : EXPR_SIGNED (i) ? intbig_to_lisp (i) : uintbig_to_lisp (i))
3349 || FIXNUM_OVERFLOW_P (UINTMAX_MAX >> 16)) \ 3349extern Lisp_Object intbig_to_lisp (intmax_t);
3350 && FIXNUM_OVERFLOW_P ((i) >> 16)) \ 3350extern Lisp_Object uintbig_to_lisp (uintmax_t);
3351 ? Fcons (make_number ((i) >> 16), make_number ((i) & 0xffff)) \
3352 : ! ((FIXNUM_OVERFLOW_P (INTMAX_MIN >> 16 >> 24) \
3353 || FIXNUM_OVERFLOW_P (UINTMAX_MAX >> 16 >> 24)) \
3354 && FIXNUM_OVERFLOW_P ((i) >> 16 >> 24)) \
3355 ? Fcons (make_number ((i) >> 16 >> 24), \
3356 Fcons (make_number ((i) >> 16 & 0xffffff), \
3357 make_number ((i) & 0xffff))) \
3358 : make_float (i))
3359 3351
3360/* Convert the Emacs representation CONS back to an integer of type 3352/* Convert the Emacs representation CONS back to an integer of type
3361 TYPE, storing the result the variable VAR. Signal an error if CONS 3353 TYPE, storing the result the variable VAR. Signal an error if CONS