diff options
| author | Tom Tromey | 2018-07-06 21:56:17 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-07-12 22:12:27 -0600 |
| commit | 42fe787b0f26c2df682b2797407a669ef8522ccb (patch) | |
| tree | e944fe465e2b65703a8361bc82647faf4f7907f1 /src/data.c | |
| parent | 01dbf2a347944497fdcf2ec156f4605020d7ba2a (diff) | |
| download | emacs-42fe787b0f26c2df682b2797407a669ef8522ccb.tar.gz emacs-42fe787b0f26c2df682b2797407a669ef8522ccb.zip | |
Rename integerp->fixnum, etc, in preparation for bignums
* src/json.c, src/keyboard.c, src/keyboard.h, src/keymap.c,
src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c,
src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c,
src/process.c, src/profiler.c, src/search.c, src/sound.c,
src/syntax.c, src/sysdep.c, src/term.c, src/terminal.c,
src/textprop.c, src/undo.c, src/w16select.c, src/w32.c,
src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c,
src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c,
src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c,
src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c,
src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename
INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM,
make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP,
NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/src/data.c b/src/data.c index c8beeda7208..aad57084647 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -132,13 +132,13 @@ set_blv_valcell (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val) | |||
| 132 | static _Noreturn void | 132 | static _Noreturn void |
| 133 | wrong_length_argument (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3) | 133 | wrong_length_argument (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3) |
| 134 | { | 134 | { |
| 135 | Lisp_Object size1 = make_number (bool_vector_size (a1)); | 135 | Lisp_Object size1 = make_fixnum (bool_vector_size (a1)); |
| 136 | Lisp_Object size2 = make_number (bool_vector_size (a2)); | 136 | Lisp_Object size2 = make_fixnum (bool_vector_size (a2)); |
| 137 | if (NILP (a3)) | 137 | if (NILP (a3)) |
| 138 | xsignal2 (Qwrong_length_argument, size1, size2); | 138 | xsignal2 (Qwrong_length_argument, size1, size2); |
| 139 | else | 139 | else |
| 140 | xsignal3 (Qwrong_length_argument, size1, size2, | 140 | xsignal3 (Qwrong_length_argument, size1, size2, |
| 141 | make_number (bool_vector_size (a3))); | 141 | make_fixnum (bool_vector_size (a3))); |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | _Noreturn void | 144 | _Noreturn void |
| @@ -515,7 +515,7 @@ DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, | |||
| 515 | attributes: const) | 515 | attributes: const) |
| 516 | (Lisp_Object object) | 516 | (Lisp_Object object) |
| 517 | { | 517 | { |
| 518 | if (INTEGERP (object)) | 518 | if (FIXNUMP (object)) |
| 519 | return Qt; | 519 | return Qt; |
| 520 | return Qnil; | 520 | return Qnil; |
| 521 | } | 521 | } |
| @@ -524,7 +524,7 @@ DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, | |||
| 524 | doc: /* Return t if OBJECT is an integer or a marker (editor pointer). */) | 524 | doc: /* Return t if OBJECT is an integer or a marker (editor pointer). */) |
| 525 | (register Lisp_Object object) | 525 | (register Lisp_Object object) |
| 526 | { | 526 | { |
| 527 | if (MARKERP (object) || INTEGERP (object)) | 527 | if (MARKERP (object) || FIXNUMP (object)) |
| 528 | return Qt; | 528 | return Qt; |
| 529 | return Qnil; | 529 | return Qnil; |
| 530 | } | 530 | } |
| @@ -534,7 +534,7 @@ DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, | |||
| 534 | attributes: const) | 534 | attributes: const) |
| 535 | (Lisp_Object object) | 535 | (Lisp_Object object) |
| 536 | { | 536 | { |
| 537 | if (NATNUMP (object)) | 537 | if (FIXNATP (object)) |
| 538 | return Qt; | 538 | return Qt; |
| 539 | return Qnil; | 539 | return Qnil; |
| 540 | } | 540 | } |
| @@ -544,7 +544,7 @@ DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, | |||
| 544 | attributes: const) | 544 | attributes: const) |
| 545 | (Lisp_Object object) | 545 | (Lisp_Object object) |
| 546 | { | 546 | { |
| 547 | if (NUMBERP (object)) | 547 | if (FIXED_OR_FLOATP (object)) |
| 548 | return Qt; | 548 | return Qt; |
| 549 | else | 549 | else |
| 550 | return Qnil; | 550 | return Qnil; |
| @@ -555,7 +555,7 @@ DEFUN ("number-or-marker-p", Fnumber_or_marker_p, | |||
| 555 | doc: /* Return t if OBJECT is a number or a marker. */) | 555 | doc: /* Return t if OBJECT is a number or a marker. */) |
| 556 | (Lisp_Object object) | 556 | (Lisp_Object object) |
| 557 | { | 557 | { |
| 558 | if (NUMBERP (object) || MARKERP (object)) | 558 | if (FIXED_OR_FLOATP (object) || MARKERP (object)) |
| 559 | return Qt; | 559 | return Qt; |
| 560 | return Qnil; | 560 | return Qnil; |
| 561 | } | 561 | } |
| @@ -858,10 +858,10 @@ function with `&rest' args, or `unevalled' for a special form. */) | |||
| 858 | CHECK_SUBR (subr); | 858 | CHECK_SUBR (subr); |
| 859 | minargs = XSUBR (subr)->min_args; | 859 | minargs = XSUBR (subr)->min_args; |
| 860 | maxargs = XSUBR (subr)->max_args; | 860 | maxargs = XSUBR (subr)->max_args; |
| 861 | return Fcons (make_number (minargs), | 861 | return Fcons (make_fixnum (minargs), |
| 862 | maxargs == MANY ? Qmany | 862 | maxargs == MANY ? Qmany |
| 863 | : maxargs == UNEVALLED ? Qunevalled | 863 | : maxargs == UNEVALLED ? Qunevalled |
| 864 | : make_number (maxargs)); | 864 | : make_fixnum (maxargs)); |
| 865 | } | 865 | } |
| 866 | 866 | ||
| 867 | DEFUN ("subr-name", Fsubr_name, Ssubr_name, 1, 1, 0, | 867 | DEFUN ("subr-name", Fsubr_name, Ssubr_name, 1, 1, 0, |
| @@ -1084,7 +1084,7 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva | |||
| 1084 | switch (XFWDTYPE (valcontents)) | 1084 | switch (XFWDTYPE (valcontents)) |
| 1085 | { | 1085 | { |
| 1086 | case Lisp_Fwd_Int: | 1086 | case Lisp_Fwd_Int: |
| 1087 | CHECK_NUMBER (newval); | 1087 | CHECK_FIXNUM (newval); |
| 1088 | *XINTFWD (valcontents)->intvar = XINT (newval); | 1088 | *XINTFWD (valcontents)->intvar = XINT (newval); |
| 1089 | break; | 1089 | break; |
| 1090 | 1090 | ||
| @@ -1140,7 +1140,7 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva | |||
| 1140 | else if ((prop = Fget (predicate, Qrange), !NILP (prop))) | 1140 | else if ((prop = Fget (predicate, Qrange), !NILP (prop))) |
| 1141 | { | 1141 | { |
| 1142 | Lisp_Object min = XCAR (prop), max = XCDR (prop); | 1142 | Lisp_Object min = XCAR (prop), max = XCDR (prop); |
| 1143 | if (! NUMBERP (newval) | 1143 | if (! FIXED_OR_FLOATP (newval) |
| 1144 | || NILP (CALLN (Fleq, min, newval, max))) | 1144 | || NILP (CALLN (Fleq, min, newval, max))) |
| 1145 | wrong_range (min, max, newval); | 1145 | wrong_range (min, max, newval); |
| 1146 | } | 1146 | } |
| @@ -2232,7 +2232,7 @@ or a byte-code object. IDX starts at 0. */) | |||
| 2232 | { | 2232 | { |
| 2233 | register EMACS_INT idxval; | 2233 | register EMACS_INT idxval; |
| 2234 | 2234 | ||
| 2235 | CHECK_NUMBER (idx); | 2235 | CHECK_FIXNUM (idx); |
| 2236 | idxval = XINT (idx); | 2236 | idxval = XINT (idx); |
| 2237 | if (STRINGP (array)) | 2237 | if (STRINGP (array)) |
| 2238 | { | 2238 | { |
| @@ -2242,11 +2242,11 @@ or a byte-code object. IDX starts at 0. */) | |||
| 2242 | if (idxval < 0 || idxval >= SCHARS (array)) | 2242 | if (idxval < 0 || idxval >= SCHARS (array)) |
| 2243 | args_out_of_range (array, idx); | 2243 | args_out_of_range (array, idx); |
| 2244 | if (! STRING_MULTIBYTE (array)) | 2244 | if (! STRING_MULTIBYTE (array)) |
| 2245 | return make_number ((unsigned char) SREF (array, idxval)); | 2245 | return make_fixnum ((unsigned char) SREF (array, idxval)); |
| 2246 | idxval_byte = string_char_to_byte (array, idxval); | 2246 | idxval_byte = string_char_to_byte (array, idxval); |
| 2247 | 2247 | ||
| 2248 | c = STRING_CHAR (SDATA (array) + idxval_byte); | 2248 | c = STRING_CHAR (SDATA (array) + idxval_byte); |
| 2249 | return make_number (c); | 2249 | return make_fixnum (c); |
| 2250 | } | 2250 | } |
| 2251 | else if (BOOL_VECTOR_P (array)) | 2251 | else if (BOOL_VECTOR_P (array)) |
| 2252 | { | 2252 | { |
| @@ -2283,7 +2283,7 @@ bool-vector. IDX starts at 0. */) | |||
| 2283 | { | 2283 | { |
| 2284 | register EMACS_INT idxval; | 2284 | register EMACS_INT idxval; |
| 2285 | 2285 | ||
| 2286 | CHECK_NUMBER (idx); | 2286 | CHECK_FIXNUM (idx); |
| 2287 | idxval = XINT (idx); | 2287 | idxval = XINT (idx); |
| 2288 | if (! RECORDP (array)) | 2288 | if (! RECORDP (array)) |
| 2289 | CHECK_ARRAY (array, Qarrayp); | 2289 | CHECK_ARRAY (array, Qarrayp); |
| @@ -2385,8 +2385,8 @@ arithcompare (Lisp_Object num1, Lisp_Object num2, | |||
| 2385 | bool fneq; | 2385 | bool fneq; |
| 2386 | bool test; | 2386 | bool test; |
| 2387 | 2387 | ||
| 2388 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num1); | 2388 | CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (num1); |
| 2389 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num2); | 2389 | CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (num2); |
| 2390 | 2390 | ||
| 2391 | /* If either arg is floating point, set F1 and F2 to the 'double' | 2391 | /* If either arg is floating point, set F1 and F2 to the 'double' |
| 2392 | approximations of the two arguments, and set FNEQ if floating-point | 2392 | approximations of the two arguments, and set FNEQ if floating-point |
| @@ -2532,12 +2532,12 @@ DEFUN ("/=", Fneq, Sneq, 2, 2, 0, | |||
| 2532 | (eassert (FIXNUM_OVERFLOW_P (i)), \ | 2532 | (eassert (FIXNUM_OVERFLOW_P (i)), \ |
| 2533 | (! (FIXNUM_OVERFLOW_P ((extremum) >> 16) \ | 2533 | (! (FIXNUM_OVERFLOW_P ((extremum) >> 16) \ |
| 2534 | && FIXNUM_OVERFLOW_P ((i) >> 16)) \ | 2534 | && FIXNUM_OVERFLOW_P ((i) >> 16)) \ |
| 2535 | ? Fcons (make_number ((i) >> 16), make_number ((i) & 0xffff)) \ | 2535 | ? Fcons (make_fixnum ((i) >> 16), make_fixnum ((i) & 0xffff)) \ |
| 2536 | : ! (FIXNUM_OVERFLOW_P ((extremum) >> 16 >> 24) \ | 2536 | : ! (FIXNUM_OVERFLOW_P ((extremum) >> 16 >> 24) \ |
| 2537 | && FIXNUM_OVERFLOW_P ((i) >> 16 >> 24)) \ | 2537 | && FIXNUM_OVERFLOW_P ((i) >> 16 >> 24)) \ |
| 2538 | ? Fcons (make_number ((i) >> 16 >> 24), \ | 2538 | ? Fcons (make_fixnum ((i) >> 16 >> 24), \ |
| 2539 | Fcons (make_number ((i) >> 16 & 0xffffff), \ | 2539 | Fcons (make_fixnum ((i) >> 16 & 0xffffff), \ |
| 2540 | make_number ((i) & 0xffff))) \ | 2540 | make_fixnum ((i) & 0xffff))) \ |
| 2541 | : make_float (i))) | 2541 | : make_float (i))) |
| 2542 | 2542 | ||
| 2543 | Lisp_Object | 2543 | Lisp_Object |
| @@ -2561,7 +2561,7 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max) | |||
| 2561 | { | 2561 | { |
| 2562 | bool valid = false; | 2562 | bool valid = false; |
| 2563 | uintmax_t val UNINIT; | 2563 | uintmax_t val UNINIT; |
| 2564 | if (INTEGERP (c)) | 2564 | if (FIXNUMP (c)) |
| 2565 | { | 2565 | { |
| 2566 | valid = XINT (c) >= 0; | 2566 | valid = XINT (c) >= 0; |
| 2567 | val = XINT (c); | 2567 | val = XINT (c); |
| @@ -2575,14 +2575,14 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max) | |||
| 2575 | valid = val == d; | 2575 | valid = val == d; |
| 2576 | } | 2576 | } |
| 2577 | } | 2577 | } |
| 2578 | else if (CONSP (c) && NATNUMP (XCAR (c))) | 2578 | else if (CONSP (c) && FIXNATP (XCAR (c))) |
| 2579 | { | 2579 | { |
| 2580 | uintmax_t top = XFASTINT (XCAR (c)); | 2580 | uintmax_t top = XFASTINT (XCAR (c)); |
| 2581 | Lisp_Object rest = XCDR (c); | 2581 | Lisp_Object rest = XCDR (c); |
| 2582 | if (top <= UINTMAX_MAX >> 24 >> 16 | 2582 | if (top <= UINTMAX_MAX >> 24 >> 16 |
| 2583 | && CONSP (rest) | 2583 | && CONSP (rest) |
| 2584 | && NATNUMP (XCAR (rest)) && XFASTINT (XCAR (rest)) < 1 << 24 | 2584 | && FIXNATP (XCAR (rest)) && XFASTINT (XCAR (rest)) < 1 << 24 |
| 2585 | && NATNUMP (XCDR (rest)) && XFASTINT (XCDR (rest)) < 1 << 16) | 2585 | && FIXNATP (XCDR (rest)) && XFASTINT (XCDR (rest)) < 1 << 16) |
| 2586 | { | 2586 | { |
| 2587 | uintmax_t mid = XFASTINT (XCAR (rest)); | 2587 | uintmax_t mid = XFASTINT (XCAR (rest)); |
| 2588 | val = top << 24 << 16 | mid << 16 | XFASTINT (XCDR (rest)); | 2588 | val = top << 24 << 16 | mid << 16 | XFASTINT (XCDR (rest)); |
| @@ -2592,7 +2592,7 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max) | |||
| 2592 | { | 2592 | { |
| 2593 | if (CONSP (rest)) | 2593 | if (CONSP (rest)) |
| 2594 | rest = XCAR (rest); | 2594 | rest = XCAR (rest); |
| 2595 | if (NATNUMP (rest) && XFASTINT (rest) < 1 << 16) | 2595 | if (FIXNATP (rest) && XFASTINT (rest) < 1 << 16) |
| 2596 | { | 2596 | { |
| 2597 | val = top << 16 | XFASTINT (rest); | 2597 | val = top << 16 | XFASTINT (rest); |
| 2598 | valid = true; | 2598 | valid = true; |
| @@ -2615,7 +2615,7 @@ cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max) | |||
| 2615 | { | 2615 | { |
| 2616 | bool valid = false; | 2616 | bool valid = false; |
| 2617 | intmax_t val UNINIT; | 2617 | intmax_t val UNINIT; |
| 2618 | if (INTEGERP (c)) | 2618 | if (FIXNUMP (c)) |
| 2619 | { | 2619 | { |
| 2620 | val = XINT (c); | 2620 | val = XINT (c); |
| 2621 | valid = true; | 2621 | valid = true; |
| @@ -2629,14 +2629,14 @@ cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max) | |||
| 2629 | valid = val == d; | 2629 | valid = val == d; |
| 2630 | } | 2630 | } |
| 2631 | } | 2631 | } |
| 2632 | else if (CONSP (c) && INTEGERP (XCAR (c))) | 2632 | else if (CONSP (c) && FIXNUMP (XCAR (c))) |
| 2633 | { | 2633 | { |
| 2634 | intmax_t top = XINT (XCAR (c)); | 2634 | intmax_t top = XINT (XCAR (c)); |
| 2635 | Lisp_Object rest = XCDR (c); | 2635 | Lisp_Object rest = XCDR (c); |
| 2636 | if (top >= INTMAX_MIN >> 24 >> 16 && top <= INTMAX_MAX >> 24 >> 16 | 2636 | if (top >= INTMAX_MIN >> 24 >> 16 && top <= INTMAX_MAX >> 24 >> 16 |
| 2637 | && CONSP (rest) | 2637 | && CONSP (rest) |
| 2638 | && NATNUMP (XCAR (rest)) && XFASTINT (XCAR (rest)) < 1 << 24 | 2638 | && FIXNATP (XCAR (rest)) && XFASTINT (XCAR (rest)) < 1 << 24 |
| 2639 | && NATNUMP (XCDR (rest)) && XFASTINT (XCDR (rest)) < 1 << 16) | 2639 | && FIXNATP (XCDR (rest)) && XFASTINT (XCDR (rest)) < 1 << 16) |
| 2640 | { | 2640 | { |
| 2641 | intmax_t mid = XFASTINT (XCAR (rest)); | 2641 | intmax_t mid = XFASTINT (XCAR (rest)); |
| 2642 | val = top << 24 << 16 | mid << 16 | XFASTINT (XCDR (rest)); | 2642 | val = top << 24 << 16 | mid << 16 | XFASTINT (XCDR (rest)); |
| @@ -2646,7 +2646,7 @@ cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max) | |||
| 2646 | { | 2646 | { |
| 2647 | if (CONSP (rest)) | 2647 | if (CONSP (rest)) |
| 2648 | rest = XCAR (rest); | 2648 | rest = XCAR (rest); |
| 2649 | if (NATNUMP (rest) && XFASTINT (rest) < 1 << 16) | 2649 | if (FIXNATP (rest) && XFASTINT (rest) < 1 << 16) |
| 2650 | { | 2650 | { |
| 2651 | val = top << 16 | XFASTINT (rest); | 2651 | val = top << 16 | XFASTINT (rest); |
| 2652 | valid = true; | 2652 | valid = true; |
| @@ -2668,7 +2668,7 @@ NUMBER may be an integer or a floating point number. */) | |||
| 2668 | char buffer[max (FLOAT_TO_STRING_BUFSIZE, INT_BUFSIZE_BOUND (EMACS_INT))]; | 2668 | char buffer[max (FLOAT_TO_STRING_BUFSIZE, INT_BUFSIZE_BOUND (EMACS_INT))]; |
| 2669 | int len; | 2669 | int len; |
| 2670 | 2670 | ||
| 2671 | CHECK_NUMBER_OR_FLOAT (number); | 2671 | CHECK_FIXNUM_OR_FLOAT (number); |
| 2672 | 2672 | ||
| 2673 | if (FLOATP (number)) | 2673 | if (FLOATP (number)) |
| 2674 | len = float_to_string (buffer, XFLOAT_DATA (number)); | 2674 | len = float_to_string (buffer, XFLOAT_DATA (number)); |
| @@ -2696,7 +2696,7 @@ If the base used is not 10, STRING is always parsed as an integer. */) | |||
| 2696 | b = 10; | 2696 | b = 10; |
| 2697 | else | 2697 | else |
| 2698 | { | 2698 | { |
| 2699 | CHECK_NUMBER (base); | 2699 | CHECK_FIXNUM (base); |
| 2700 | if (! (XINT (base) >= 2 && XINT (base) <= 16)) | 2700 | if (! (XINT (base) >= 2 && XINT (base) <= 16)) |
| 2701 | xsignal1 (Qargs_out_of_range, base); | 2701 | xsignal1 (Qargs_out_of_range, base); |
| 2702 | b = XINT (base); | 2702 | b = XINT (base); |
| @@ -2708,7 +2708,7 @@ If the base used is not 10, STRING is always parsed as an integer. */) | |||
| 2708 | 2708 | ||
| 2709 | int flags = S2N_IGNORE_TRAILING | S2N_OVERFLOW_TO_FLOAT; | 2709 | int flags = S2N_IGNORE_TRAILING | S2N_OVERFLOW_TO_FLOAT; |
| 2710 | Lisp_Object val = string_to_number (p, b, flags); | 2710 | Lisp_Object val = string_to_number (p, b, flags); |
| 2711 | return NILP (val) ? make_number (0) : val; | 2711 | return NILP (val) ? make_fixnum (0) : val; |
| 2712 | } | 2712 | } |
| 2713 | 2713 | ||
| 2714 | enum arithop | 2714 | enum arithop |
| @@ -2760,9 +2760,9 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) | |||
| 2760 | ok_accum = accum; | 2760 | ok_accum = accum; |
| 2761 | } | 2761 | } |
| 2762 | 2762 | ||
| 2763 | /* Using args[argnum] as argument to CHECK_NUMBER_... */ | 2763 | /* Using args[argnum] as argument to CHECK_FIXNUM_... */ |
| 2764 | val = args[argnum]; | 2764 | val = args[argnum]; |
| 2765 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (val); | 2765 | CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (val); |
| 2766 | 2766 | ||
| 2767 | if (FLOATP (val)) | 2767 | if (FLOATP (val)) |
| 2768 | return float_arith_driver (ok_accum, ok_args, code, | 2768 | return float_arith_driver (ok_accum, ok_args, code, |
| @@ -2825,8 +2825,8 @@ float_arith_driver (double accum, ptrdiff_t argnum, enum arithop code, | |||
| 2825 | 2825 | ||
| 2826 | for (; argnum < nargs; argnum++) | 2826 | for (; argnum < nargs; argnum++) |
| 2827 | { | 2827 | { |
| 2828 | val = args[argnum]; /* using args[argnum] as argument to CHECK_NUMBER_... */ | 2828 | val = args[argnum]; /* using args[argnum] as argument to CHECK_FIXNUM_... */ |
| 2829 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (val); | 2829 | CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (val); |
| 2830 | 2830 | ||
| 2831 | if (FLOATP (val)) | 2831 | if (FLOATP (val)) |
| 2832 | { | 2832 | { |
| @@ -2917,8 +2917,8 @@ Both must be integers or markers. */) | |||
| 2917 | { | 2917 | { |
| 2918 | Lisp_Object val; | 2918 | Lisp_Object val; |
| 2919 | 2919 | ||
| 2920 | CHECK_NUMBER_COERCE_MARKER (x); | 2920 | CHECK_FIXNUM_COERCE_MARKER (x); |
| 2921 | CHECK_NUMBER_COERCE_MARKER (y); | 2921 | CHECK_FIXNUM_COERCE_MARKER (y); |
| 2922 | 2922 | ||
| 2923 | if (XINT (y) == 0) | 2923 | if (XINT (y) == 0) |
| 2924 | xsignal0 (Qarith_error); | 2924 | xsignal0 (Qarith_error); |
| @@ -2936,8 +2936,8 @@ Both X and Y must be numbers or markers. */) | |||
| 2936 | Lisp_Object val; | 2936 | Lisp_Object val; |
| 2937 | EMACS_INT i1, i2; | 2937 | EMACS_INT i1, i2; |
| 2938 | 2938 | ||
| 2939 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (x); | 2939 | CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (x); |
| 2940 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (y); | 2940 | CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (y); |
| 2941 | 2941 | ||
| 2942 | if (FLOATP (x) || FLOATP (y)) | 2942 | if (FLOATP (x) || FLOATP (y)) |
| 2943 | return fmod_float (x, y); | 2943 | return fmod_float (x, y); |
| @@ -2963,11 +2963,11 @@ minmax_driver (ptrdiff_t nargs, Lisp_Object *args, | |||
| 2963 | enum Arith_Comparison comparison) | 2963 | enum Arith_Comparison comparison) |
| 2964 | { | 2964 | { |
| 2965 | Lisp_Object accum = args[0]; | 2965 | Lisp_Object accum = args[0]; |
| 2966 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (accum); | 2966 | CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (accum); |
| 2967 | for (ptrdiff_t argnum = 1; argnum < nargs; argnum++) | 2967 | for (ptrdiff_t argnum = 1; argnum < nargs; argnum++) |
| 2968 | { | 2968 | { |
| 2969 | Lisp_Object val = args[argnum]; | 2969 | Lisp_Object val = args[argnum]; |
| 2970 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (val); | 2970 | CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (val); |
| 2971 | if (!NILP (arithcompare (val, accum, comparison))) | 2971 | if (!NILP (arithcompare (val, accum, comparison))) |
| 2972 | accum = val; | 2972 | accum = val; |
| 2973 | else if (FLOATP (val) && isnan (XFLOAT_DATA (val))) | 2973 | else if (FLOATP (val) && isnan (XFLOAT_DATA (val))) |
| @@ -3028,9 +3028,9 @@ of VALUE. If VALUE is negative, return the number of zero bits in the | |||
| 3028 | representation. */) | 3028 | representation. */) |
| 3029 | (Lisp_Object value) | 3029 | (Lisp_Object value) |
| 3030 | { | 3030 | { |
| 3031 | CHECK_NUMBER (value); | 3031 | CHECK_FIXNUM (value); |
| 3032 | EMACS_INT v = XINT (value) < 0 ? -1 - XINT (value) : XINT (value); | 3032 | EMACS_INT v = XINT (value) < 0 ? -1 - XINT (value) : XINT (value); |
| 3033 | return make_number (EMACS_UINT_WIDTH <= UINT_WIDTH | 3033 | return make_fixnum (EMACS_UINT_WIDTH <= UINT_WIDTH |
| 3034 | ? count_one_bits (v) | 3034 | ? count_one_bits (v) |
| 3035 | : EMACS_UINT_WIDTH <= ULONG_WIDTH | 3035 | : EMACS_UINT_WIDTH <= ULONG_WIDTH |
| 3036 | ? count_one_bits_l (v) | 3036 | ? count_one_bits_l (v) |
| @@ -3045,8 +3045,8 @@ ash_lsh_impl (Lisp_Object value, Lisp_Object count, bool lsh) | |||
| 3045 | 3045 | ||
| 3046 | Lisp_Object val; | 3046 | Lisp_Object val; |
| 3047 | 3047 | ||
| 3048 | CHECK_NUMBER (value); | 3048 | CHECK_FIXNUM (value); |
| 3049 | CHECK_NUMBER (count); | 3049 | CHECK_FIXNUM (count); |
| 3050 | 3050 | ||
| 3051 | if (XINT (count) >= EMACS_INT_WIDTH) | 3051 | if (XINT (count) >= EMACS_INT_WIDTH) |
| 3052 | XSETINT (val, 0); | 3052 | XSETINT (val, 0); |
| @@ -3083,7 +3083,7 @@ DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0, | |||
| 3083 | Markers are converted to integers. */) | 3083 | Markers are converted to integers. */) |
| 3084 | (register Lisp_Object number) | 3084 | (register Lisp_Object number) |
| 3085 | { | 3085 | { |
| 3086 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); | 3086 | CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (number); |
| 3087 | 3087 | ||
| 3088 | if (FLOATP (number)) | 3088 | if (FLOATP (number)) |
| 3089 | return (make_float (1.0 + XFLOAT_DATA (number))); | 3089 | return (make_float (1.0 + XFLOAT_DATA (number))); |
| @@ -3097,7 +3097,7 @@ DEFUN ("1-", Fsub1, Ssub1, 1, 1, 0, | |||
| 3097 | Markers are converted to integers. */) | 3097 | Markers are converted to integers. */) |
| 3098 | (register Lisp_Object number) | 3098 | (register Lisp_Object number) |
| 3099 | { | 3099 | { |
| 3100 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); | 3100 | CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (number); |
| 3101 | 3101 | ||
| 3102 | if (FLOATP (number)) | 3102 | if (FLOATP (number)) |
| 3103 | return (make_float (-1.0 + XFLOAT_DATA (number))); | 3103 | return (make_float (-1.0 + XFLOAT_DATA (number))); |
| @@ -3110,7 +3110,7 @@ DEFUN ("lognot", Flognot, Slognot, 1, 1, 0, | |||
| 3110 | doc: /* Return the bitwise complement of NUMBER. NUMBER must be an integer. */) | 3110 | doc: /* Return the bitwise complement of NUMBER. NUMBER must be an integer. */) |
| 3111 | (register Lisp_Object number) | 3111 | (register Lisp_Object number) |
| 3112 | { | 3112 | { |
| 3113 | CHECK_NUMBER (number); | 3113 | CHECK_FIXNUM (number); |
| 3114 | XSETINT (number, ~XINT (number)); | 3114 | XSETINT (number, ~XINT (number)); |
| 3115 | return number; | 3115 | return number; |
| 3116 | } | 3116 | } |
| @@ -3125,7 +3125,7 @@ lowercase l) for small endian machines. */ | |||
| 3125 | unsigned i = 0x04030201; | 3125 | unsigned i = 0x04030201; |
| 3126 | int order = *(char *)&i == 1 ? 108 : 66; | 3126 | int order = *(char *)&i == 1 ? 108 : 66; |
| 3127 | 3127 | ||
| 3128 | return make_number (order); | 3128 | return make_fixnum (order); |
| 3129 | } | 3129 | } |
| 3130 | 3130 | ||
| 3131 | /* Because we round up the bool vector allocate size to word_size | 3131 | /* Because we round up the bool vector allocate size to word_size |
| @@ -3478,7 +3478,7 @@ value from A's length. */) | |||
| 3478 | for (i = 0; i < nwords; i++) | 3478 | for (i = 0; i < nwords; i++) |
| 3479 | count += count_one_bits_word (adata[i]); | 3479 | count += count_one_bits_word (adata[i]); |
| 3480 | 3480 | ||
| 3481 | return make_number (count); | 3481 | return make_fixnum (count); |
| 3482 | } | 3482 | } |
| 3483 | 3483 | ||
| 3484 | DEFUN ("bool-vector-count-consecutive", Fbool_vector_count_consecutive, | 3484 | DEFUN ("bool-vector-count-consecutive", Fbool_vector_count_consecutive, |
| @@ -3497,7 +3497,7 @@ A is a bool vector, B is t or nil, and I is an index into A. */) | |||
| 3497 | ptrdiff_t nr_words; | 3497 | ptrdiff_t nr_words; |
| 3498 | 3498 | ||
| 3499 | CHECK_BOOL_VECTOR (a); | 3499 | CHECK_BOOL_VECTOR (a); |
| 3500 | CHECK_NATNUM (i); | 3500 | CHECK_FIXNAT (i); |
| 3501 | 3501 | ||
| 3502 | nr_bits = bool_vector_size (a); | 3502 | nr_bits = bool_vector_size (a); |
| 3503 | if (XFASTINT (i) > nr_bits) /* Allow one past the end for convenience */ | 3503 | if (XFASTINT (i) > nr_bits) /* Allow one past the end for convenience */ |
| @@ -3527,7 +3527,7 @@ A is a bool vector, B is t or nil, and I is an index into A. */) | |||
| 3527 | count = count_trailing_zero_bits (mword); | 3527 | count = count_trailing_zero_bits (mword); |
| 3528 | pos++; | 3528 | pos++; |
| 3529 | if (count + offset < BITS_PER_BITS_WORD) | 3529 | if (count + offset < BITS_PER_BITS_WORD) |
| 3530 | return make_number (count); | 3530 | return make_fixnum (count); |
| 3531 | } | 3531 | } |
| 3532 | 3532 | ||
| 3533 | /* Scan whole words until we either reach the end of the vector or | 3533 | /* Scan whole words until we either reach the end of the vector or |
| @@ -3554,7 +3554,7 @@ A is a bool vector, B is t or nil, and I is an index into A. */) | |||
| 3554 | count -= BITS_PER_BITS_WORD - nr_bits % BITS_PER_BITS_WORD; | 3554 | count -= BITS_PER_BITS_WORD - nr_bits % BITS_PER_BITS_WORD; |
| 3555 | } | 3555 | } |
| 3556 | 3556 | ||
| 3557 | return make_number (count); | 3557 | return make_fixnum (count); |
| 3558 | } | 3558 | } |
| 3559 | 3559 | ||
| 3560 | 3560 | ||
| @@ -3847,13 +3847,13 @@ syms_of_data (void) | |||
| 3847 | DEFVAR_LISP ("most-positive-fixnum", Vmost_positive_fixnum, | 3847 | DEFVAR_LISP ("most-positive-fixnum", Vmost_positive_fixnum, |
| 3848 | doc: /* The largest value that is representable in a Lisp integer. | 3848 | doc: /* The largest value that is representable in a Lisp integer. |
| 3849 | This variable cannot be set; trying to do so will signal an error. */); | 3849 | This variable cannot be set; trying to do so will signal an error. */); |
| 3850 | Vmost_positive_fixnum = make_number (MOST_POSITIVE_FIXNUM); | 3850 | Vmost_positive_fixnum = make_fixnum (MOST_POSITIVE_FIXNUM); |
| 3851 | make_symbol_constant (intern_c_string ("most-positive-fixnum")); | 3851 | make_symbol_constant (intern_c_string ("most-positive-fixnum")); |
| 3852 | 3852 | ||
| 3853 | DEFVAR_LISP ("most-negative-fixnum", Vmost_negative_fixnum, | 3853 | DEFVAR_LISP ("most-negative-fixnum", Vmost_negative_fixnum, |
| 3854 | doc: /* The smallest value that is representable in a Lisp integer. | 3854 | doc: /* The smallest value that is representable in a Lisp integer. |
| 3855 | This variable cannot be set; trying to do so will signal an error. */); | 3855 | This variable cannot be set; trying to do so will signal an error. */); |
| 3856 | Vmost_negative_fixnum = make_number (MOST_NEGATIVE_FIXNUM); | 3856 | Vmost_negative_fixnum = make_fixnum (MOST_NEGATIVE_FIXNUM); |
| 3857 | make_symbol_constant (intern_c_string ("most-negative-fixnum")); | 3857 | make_symbol_constant (intern_c_string ("most-negative-fixnum")); |
| 3858 | 3858 | ||
| 3859 | DEFSYM (Qwatchers, "watchers"); | 3859 | DEFSYM (Qwatchers, "watchers"); |