Commit 42fe787b authored by Tom Tromey's avatar Tom Tromey
Browse files

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.
parent 01dbf2a3
......@@ -2321,7 +2321,7 @@ a multibyte string even if INIT is an ASCII character. */)
int c;
EMACS_INT nbytes;
CHECK_NATNUM (length);
CHECK_FIXNAT (length);
CHECK_CHARACTER (init);
c = XFASTINT (init);
......@@ -2415,7 +2415,7 @@ LENGTH must be a number. INIT matters only in whether it is t or nil. */)
{
Lisp_Object val;
CHECK_NATNUM (length);
CHECK_FIXNAT (length);
val = make_uninit_bool_vector (XFASTINT (length));
return bool_vector_fill (val, init);
}
......@@ -2894,7 +2894,7 @@ DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0,
(Lisp_Object length, Lisp_Object init)
{
Lisp_Object val = Qnil;
CHECK_NATNUM (length);
CHECK_FIXNAT (length);
for (EMACS_INT size = XFASTINT (length); 0 < size; size--)
{
......@@ -3439,7 +3439,7 @@ symbol or a type descriptor. SLOTS is the number of non-type slots,
each initialized to INIT. */)
(Lisp_Object type, Lisp_Object slots, Lisp_Object init)
{
CHECK_NATNUM (slots);
CHECK_FIXNAT (slots);
EMACS_INT size = XFASTINT (slots) + 1;
struct Lisp_Vector *p = allocate_record (size);
p->contents[0] = type;
......@@ -3468,7 +3468,7 @@ DEFUN ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0,
See also the function `vector'. */)
(Lisp_Object length, Lisp_Object init)
{
CHECK_NATNUM (length);
CHECK_FIXNAT (length);
struct Lisp_Vector *p = allocate_vector (XFASTINT (length));
for (ptrdiff_t i = 0; i < XFASTINT (length); i++)
p->contents[i] = init;
......@@ -3795,7 +3795,7 @@ make_event_array (ptrdiff_t nargs, Lisp_Object *args)
/* The things that fit in a string
are characters that are in 0...127,
after discarding the meta bit and all the bits above it. */
if (!INTEGERP (args[i])
if (!FIXNUMP (args[i])
|| (XINT (args[i]) & ~(-CHAR_META)) >= 0200)
return Fvector (nargs, args);
......@@ -3804,7 +3804,7 @@ make_event_array (ptrdiff_t nargs, Lisp_Object *args)
{
Lisp_Object result;
result = Fmake_string (make_number (nargs), make_number (0), Qnil);
result = Fmake_string (make_fixnum (nargs), make_fixnum (0), Qnil);
for (i = 0; i < nargs; i++)
{
SSET (result, i, XINT (args[i]));
......@@ -4691,7 +4691,7 @@ mark_maybe_object (Lisp_Object obj)
VALGRIND_MAKE_MEM_DEFINED (&obj, sizeof (obj));
#endif
if (INTEGERP (obj))
if (FIXNUMP (obj))
return;
void *po = XPNTR (obj);
......@@ -5171,7 +5171,7 @@ valid_pointer_p (void *p)
int
valid_lisp_object_p (Lisp_Object obj)
{
if (INTEGERP (obj))
if (FIXNUMP (obj))
return 1;
void *p = XPNTR (obj);
......@@ -5504,7 +5504,7 @@ static struct pinned_object
static Lisp_Object
purecopy (Lisp_Object obj)
{
if (INTEGERP (obj)
if (FIXNUMP (obj)
|| (! SYMBOLP (obj) && PURE_P (XPNTR (obj)))
|| SUBRP (obj))
return obj; /* Already pure. */
......@@ -5614,7 +5614,7 @@ inhibit_garbage_collection (void)
{
ptrdiff_t count = SPECPDL_INDEX ();
specbind (Qgc_cons_threshold, make_number (MOST_POSITIVE_FIXNUM));
specbind (Qgc_cons_threshold, make_fixnum (MOST_POSITIVE_FIXNUM));
return count;
}
......@@ -5624,7 +5624,7 @@ inhibit_garbage_collection (void)
static Lisp_Object
bounded_number (EMACS_INT number)
{
return make_number (min (MOST_POSITIVE_FIXNUM, number));
return make_fixnum (min (MOST_POSITIVE_FIXNUM, number));
}
/* Calculate total bytes of live objects. */
......@@ -5977,37 +5977,37 @@ garbage_collect_1 (void *end)
unbind_to (count, Qnil);
Lisp_Object total[] = {
list4 (Qconses, make_number (sizeof (struct Lisp_Cons)),
list4 (Qconses, make_fixnum (sizeof (struct Lisp_Cons)),
bounded_number (total_conses),
bounded_number (total_free_conses)),
list4 (Qsymbols, make_number (sizeof (struct Lisp_Symbol)),
list4 (Qsymbols, make_fixnum (sizeof (struct Lisp_Symbol)),
bounded_number (total_symbols),
bounded_number (total_free_symbols)),
list4 (Qmiscs, make_number (sizeof (union Lisp_Misc)),
list4 (Qmiscs, make_fixnum (sizeof (union Lisp_Misc)),
bounded_number (total_markers),
bounded_number (total_free_markers)),
list4 (Qstrings, make_number (sizeof (struct Lisp_String)),
list4 (Qstrings, make_fixnum (sizeof (struct Lisp_String)),
bounded_number (total_strings),
bounded_number (total_free_strings)),
list3 (Qstring_bytes, make_number (1),
list3 (Qstring_bytes, make_fixnum (1),
bounded_number (total_string_bytes)),
list3 (Qvectors,
make_number (header_size + sizeof (Lisp_Object)),
make_fixnum (header_size + sizeof (Lisp_Object)),
bounded_number (total_vectors)),
list4 (Qvector_slots, make_number (word_size),
list4 (Qvector_slots, make_fixnum (word_size),
bounded_number (total_vector_slots),
bounded_number (total_free_vector_slots)),
list4 (Qfloats, make_number (sizeof (struct Lisp_Float)),
list4 (Qfloats, make_fixnum (sizeof (struct Lisp_Float)),
bounded_number (total_floats),
bounded_number (total_free_floats)),
list4 (Qintervals, make_number (sizeof (struct interval)),
list4 (Qintervals, make_fixnum (sizeof (struct interval)),
bounded_number (total_intervals),
bounded_number (total_free_intervals)),
list3 (Qbuffers, make_number (sizeof (struct buffer)),
list3 (Qbuffers, make_fixnum (sizeof (struct buffer)),
bounded_number (total_buffers)),
#ifdef DOUG_LEA_MALLOC
list4 (Qheap, make_number (1024),
list4 (Qheap, make_fixnum (1024),
bounded_number ((mallinfo ().uordblks + 1023) >> 10),
bounded_number ((mallinfo ().fordblks + 1023) >> 10)),
#endif
......@@ -6142,7 +6142,7 @@ mark_char_table (struct Lisp_Vector *ptr, enum pvec_type pvectype)
{
Lisp_Object val = ptr->contents[i];
if (INTEGERP (val) || (SYMBOLP (val) && XSYMBOL (val)->u.s.gcmarkbit))
if (FIXNUMP (val) || (SYMBOLP (val) && XSYMBOL (val)->u.s.gcmarkbit))
continue;
if (SUB_CHAR_TABLE_P (val))
{
......
......@@ -379,7 +379,7 @@ bidi_mirror_char (int c)
emacs_abort ();
val = CHAR_TABLE_REF (bidi_mirror_table, c);
if (INTEGERP (val))
if (FIXNUMP (val))
{
int v;
......
......@@ -849,7 +849,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
clone_per_buffer_values (b->base_buffer, b);
bset_filename (b, Qnil);
bset_file_truename (b, Qnil);
bset_display_count (b, make_number (0));
bset_display_count (b, make_fixnum (0));
bset_backed_up (b, Qnil);
bset_auto_save_file_name (b, Qnil);
set_buffer_internal_1 (b);
......@@ -939,7 +939,7 @@ reset_buffer (register struct buffer *b)
bset_file_format (b, Qnil);
bset_auto_save_file_format (b, Qt);
bset_last_selected_window (b, Qnil);
bset_display_count (b, make_number (0));
bset_display_count (b, make_fixnum (0));
bset_display_time (b, Qnil);
bset_enable_multibyte_characters
(b, BVAR (&buffer_defaults, enable_multibyte_characters));
......@@ -1103,7 +1103,7 @@ is first appended to NAME, to speed up finding a non-existent buffer. */)
char number[sizeof "-999999"];
/* Use XINT instead of XFASTINT to work around GCC bug 80776. */
int i = XINT (Frandom (make_number (1000000)));
int i = XINT (Frandom (make_fixnum (1000000)));
eassume (0 <= i && i < 1000000);
AUTO_STRING_WITH_LEN (lnumber, number, sprintf (number, "-%d", i));
......@@ -1421,7 +1421,7 @@ text in that buffer is changed. It wraps around occasionally.
No argument or nil as argument means use current buffer as BUFFER. */)
(register Lisp_Object buffer)
{
return make_number (BUF_MODIFF (decode_buffer (buffer)));
return make_fixnum (BUF_MODIFF (decode_buffer (buffer)));
}
DEFUN ("buffer-chars-modified-tick", Fbuffer_chars_modified_tick,
......@@ -1436,7 +1436,7 @@ between these calls. No argument or nil as argument means use current
buffer as BUFFER. */)
(register Lisp_Object buffer)
{
return make_number (BUF_CHARS_MODIFF (decode_buffer (buffer)));
return make_fixnum (BUF_CHARS_MODIFF (decode_buffer (buffer)));
}
DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2,
......@@ -2203,7 +2203,7 @@ If the text under POSITION (which defaults to point) has the
if (NILP (position))
XSETFASTINT (position, PT);
else
CHECK_NUMBER (position);
CHECK_FIXNUM (position);
if (!NILP (BVAR (current_buffer, read_only))
&& NILP (Vinhibit_read_only)
......@@ -2233,8 +2233,8 @@ so the buffer is truly empty after this. */)
void
validate_region (register Lisp_Object *b, register Lisp_Object *e)
{
CHECK_NUMBER_COERCE_MARKER (*b);
CHECK_NUMBER_COERCE_MARKER (*e);
CHECK_FIXNUM_COERCE_MARKER (*b);
CHECK_FIXNUM_COERCE_MARKER (*e);
if (XINT (*b) > XINT (*e))
{
......@@ -2409,7 +2409,7 @@ results, see Info node `(elisp)Swapping Text'. */)
&& (EQ (XWINDOW (w)->contents, buf1)
|| EQ (XWINDOW (w)->contents, buf2)))
Fset_marker (XWINDOW (w)->pointm,
make_number
make_fixnum
(BUF_BEGV (XBUFFER (XWINDOW (w)->contents))),
XWINDOW (w)->contents);
/* Blindly copied from pointm part. */
......@@ -2417,14 +2417,14 @@ results, see Info node `(elisp)Swapping Text'. */)
&& (EQ (XWINDOW (w)->contents, buf1)
|| EQ (XWINDOW (w)->contents, buf2)))
Fset_marker (XWINDOW (w)->old_pointm,
make_number
make_fixnum
(BUF_BEGV (XBUFFER (XWINDOW (w)->contents))),
XWINDOW (w)->contents);
if (MARKERP (XWINDOW (w)->start)
&& (EQ (XWINDOW (w)->contents, buf1)
|| EQ (XWINDOW (w)->contents, buf2)))
Fset_marker (XWINDOW (w)->start,
make_number
make_fixnum
(XBUFFER (XWINDOW (w)->contents)->last_window_start),
XWINDOW (w)->contents);
w = Fnext_window (w, Qt, Qt);
......@@ -2547,7 +2547,7 @@ current buffer is cleared. */)
}
}
if (narrowed)
Fnarrow_to_region (make_number (begv), make_number (zv));
Fnarrow_to_region (make_fixnum (begv), make_fixnum (zv));
}
else
{
......@@ -2628,7 +2628,7 @@ current buffer is cleared. */)
TEMP_SET_PT (pt);
if (narrowed)
Fnarrow_to_region (make_number (begv), make_number (zv));
Fnarrow_to_region (make_fixnum (begv), make_fixnum (zv));
/* Do this first, so that chars_in_text asks the right question.
set_intervals_multibyte needs it too. */
......@@ -3212,7 +3212,7 @@ sort_overlays (Lisp_Object *overlay_vec, ptrdiff_t noverlays, struct window *w)
sortvec[j].priority = 0;
sortvec[j].spriority = 0;
}
else if (INTEGERP (tem))
else if (FIXNUMP (tem))
{
sortvec[j].priority = XINT (tem);
sortvec[j].spriority = 0;
......@@ -3221,8 +3221,8 @@ sort_overlays (Lisp_Object *overlay_vec, ptrdiff_t noverlays, struct window *w)
{
Lisp_Object car = XCAR (tem);
Lisp_Object cdr = XCDR (tem);
sortvec[j].priority = INTEGERP (car) ? XINT (car) : 0;
sortvec[j].spriority = INTEGERP (cdr) ? XINT (cdr) : 0;
sortvec[j].priority = FIXNUMP (car) ? XINT (car) : 0;
sortvec[j].spriority = FIXNUMP (cdr) ? XINT (cdr) : 0;
}
j++;
}
......@@ -3290,7 +3290,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str,
ssl->buf[ssl->used].string = str;
ssl->buf[ssl->used].string2 = str2;
ssl->buf[ssl->used].size = size;
ssl->buf[ssl->used].priority = (INTEGERP (pri) ? XINT (pri) : 0);
ssl->buf[ssl->used].priority = (FIXNUMP (pri) ? XINT (pri) : 0);
ssl->used++;
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
......@@ -3644,7 +3644,7 @@ fix_start_end_in_overlays (register ptrdiff_t start, register ptrdiff_t end)
if (endpos < startpos)
{
startpos = endpos;
Fset_marker (OVERLAY_START (overlay), make_number (startpos),
Fset_marker (OVERLAY_START (overlay), make_fixnum (startpos),
Qnil);
}
......@@ -3692,7 +3692,7 @@ fix_start_end_in_overlays (register ptrdiff_t start, register ptrdiff_t end)
if (endpos < startpos)
{
startpos = endpos;
Fset_marker (OVERLAY_START (overlay), make_number (startpos),
Fset_marker (OVERLAY_START (overlay), make_fixnum (startpos),
Qnil);
}
......@@ -3867,8 +3867,8 @@ for the rear of the overlay advance when text is inserted there
if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer))
signal_error ("Marker points into wrong buffer", end);
CHECK_NUMBER_COERCE_MARKER (beg);
CHECK_NUMBER_COERCE_MARKER (end);
CHECK_FIXNUM_COERCE_MARKER (beg);
CHECK_FIXNUM_COERCE_MARKER (end);
if (XINT (beg) > XINT (end))
{
......@@ -3987,8 +3987,8 @@ buffer. */)
if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer))
signal_error ("Marker points into wrong buffer", end);
CHECK_NUMBER_COERCE_MARKER (beg);
CHECK_NUMBER_COERCE_MARKER (end);
CHECK_FIXNUM_COERCE_MARKER (beg);
CHECK_FIXNUM_COERCE_MARKER (end);
if (XINT (beg) > XINT (end))
{
......@@ -4156,7 +4156,7 @@ If SORTED is non-nil, then sort them by decreasing priority. */)
Lisp_Object *overlay_vec;
Lisp_Object result;
CHECK_NUMBER_COERCE_MARKER (pos);
CHECK_FIXNUM_COERCE_MARKER (pos);
if (!buffer_has_overlays ())
return Qnil;
......@@ -4200,8 +4200,8 @@ end of the buffer. */)
Lisp_Object *overlay_vec;
Lisp_Object result;
CHECK_NUMBER_COERCE_MARKER (beg);
CHECK_NUMBER_COERCE_MARKER (end);
CHECK_FIXNUM_COERCE_MARKER (beg);
CHECK_FIXNUM_COERCE_MARKER (end);
if (!buffer_has_overlays ())
return Qnil;
......@@ -4232,10 +4232,10 @@ the value is (point-max). */)
ptrdiff_t endpos;
Lisp_Object *overlay_vec;
CHECK_NUMBER_COERCE_MARKER (pos);
CHECK_FIXNUM_COERCE_MARKER (pos);
if (!buffer_has_overlays ())
return make_number (ZV);
return make_fixnum (ZV);
len = 10;
overlay_vec = xmalloc (len * sizeof *overlay_vec);
......@@ -4260,7 +4260,7 @@ the value is (point-max). */)
}
xfree (overlay_vec);
return make_number (endpos);
return make_fixnum (endpos);
}
DEFUN ("previous-overlay-change", Fprevious_overlay_change,
......@@ -4274,10 +4274,10 @@ the value is (point-min). */)
Lisp_Object *overlay_vec;
ptrdiff_t len;
CHECK_NUMBER_COERCE_MARKER (pos);
CHECK_FIXNUM_COERCE_MARKER (pos);
if (!buffer_has_overlays ())
return make_number (BEGV);
return make_fixnum (BEGV);
/* At beginning of buffer, we know the answer;
avoid bug subtracting 1 below. */
......@@ -4294,7 +4294,7 @@ the value is (point-min). */)
0, &prevpos, 1);
xfree (overlay_vec);
return make_number (prevpos);
return make_fixnum (prevpos);
}
/* These functions are for debugging overlays. */
......@@ -4332,7 +4332,7 @@ for positions far away from POS). */)
(Lisp_Object pos)
{
ptrdiff_t p;
CHECK_NUMBER_COERCE_MARKER (pos);
CHECK_FIXNUM_COERCE_MARKER (pos);
p = clip_to_bounds (PTRDIFF_MIN, XINT (pos), PTRDIFF_MAX);
recenter_overlay_lists (current_buffer, p);
......@@ -5082,41 +5082,41 @@ init_buffer_once (void)
/* 0 means not a lisp var, -1 means always local, else mask. */
memset (&buffer_local_flags, 0, sizeof buffer_local_flags);
bset_filename (&buffer_local_flags, make_number (-1));
bset_directory (&buffer_local_flags, make_number (-1));
bset_backed_up (&buffer_local_flags, make_number (-1));
bset_save_length (&buffer_local_flags, make_number (-1));
bset_auto_save_file_name (&buffer_local_flags, make_number (-1));
bset_read_only (&buffer_local_flags, make_number (-1));
bset_major_mode (&buffer_local_flags, make_number (-1));
bset_mode_name (&buffer_local_flags, make_number (-1));
bset_undo_list (&buffer_local_flags, make_number (-1));
bset_mark_active (&buffer_local_flags, make_number (-1));
bset_point_before_scroll (&buffer_local_flags, make_number (-1));
bset_file_truename (&buffer_local_flags, make_number (-1));
bset_invisibility_spec (&buffer_local_flags, make_number (-1));
bset_file_format (&buffer_local_flags, make_number (-1));
bset_auto_save_file_format (&buffer_local_flags, make_number (-1));
bset_display_count (&buffer_local_flags, make_number (-1));
bset_display_time (&buffer_local_flags, make_number (-1));
bset_enable_multibyte_characters (&buffer_local_flags, make_number (-1));
bset_filename (&buffer_local_flags, make_fixnum (-1));
bset_directory (&buffer_local_flags, make_fixnum (-1));
bset_backed_up (&buffer_local_flags, make_fixnum (-1));
bset_save_length (&buffer_local_flags, make_fixnum (-1));
bset_auto_save_file_name (&buffer_local_flags, make_fixnum (-1));
bset_read_only (&buffer_local_flags, make_fixnum (-1));
bset_major_mode (&buffer_local_flags, make_fixnum (-1));
bset_mode_name (&buffer_local_flags, make_fixnum (-1));
bset_undo_list (&buffer_local_flags, make_fixnum (-1));
bset_mark_active (&buffer_local_flags, make_fixnum (-1));
bset_point_before_scroll (&buffer_local_flags, make_fixnum (-1));
bset_file_truename (&buffer_local_flags, make_fixnum (-1));
bset_invisibility_spec (&buffer_local_flags, make_fixnum (-1));
bset_file_format (&buffer_local_flags, make_fixnum (-1));
bset_auto_save_file_format (&buffer_local_flags, make_fixnum (-1));
bset_display_count (&buffer_local_flags, make_fixnum (-1));
bset_display_time (&buffer_local_flags, make_fixnum (-1));
bset_enable_multibyte_characters (&buffer_local_flags, make_fixnum (-1));
/* These used to be stuck at 0 by default, but now that the all-zero value
means Qnil, we have to initialize them explicitly. */
bset_name (&buffer_local_flags, make_number (0));
bset_mark (&buffer_local_flags, make_number (0));
bset_local_var_alist (&buffer_local_flags, make_number (0));
bset_keymap (&buffer_local_flags, make_number (0));
bset_downcase_table (&buffer_local_flags, make_number (0));
bset_upcase_table (&buffer_local_flags, make_number (0));
bset_case_canon_table (&buffer_local_flags, make_number (0));
bset_case_eqv_table (&buffer_local_flags, make_number (0));
bset_minor_modes (&buffer_local_flags, make_number (0));
bset_width_table (&buffer_local_flags, make_number (0));
bset_pt_marker (&buffer_local_flags, make_number (0));
bset_begv_marker (&buffer_local_flags, make_number (0));
bset_zv_marker (&buffer_local_flags, make_number (0));
bset_last_selected_window (&buffer_local_flags, make_number (0));
bset_name (&buffer_local_flags, make_fixnum (0));
bset_mark (&buffer_local_flags, make_fixnum (0));
bset_local_var_alist (&buffer_local_flags, make_fixnum (0));
bset_keymap (&buffer_local_flags, make_fixnum (0));
bset_downcase_table (&buffer_local_flags, make_fixnum (0));
bset_upcase_table (&buffer_local_flags, make_fixnum (0));
bset_case_canon_table (&buffer_local_flags, make_fixnum (0));
bset_case_eqv_table (&buffer_local_flags, make_fixnum (0));
bset_minor_modes (&buffer_local_flags, make_fixnum (0));
bset_width_table (&buffer_local_flags, make_fixnum (0));
bset_pt_marker (&buffer_local_flags, make_fixnum (0));
bset_begv_marker (&buffer_local_flags, make_fixnum (0));
bset_zv_marker (&buffer_local_flags, make_fixnum (0));
bset_last_selected_window (&buffer_local_flags, make_fixnum (0));
idx = 1;
XSETFASTINT (BVAR (&buffer_local_flags, mode_line_format), idx); ++idx;
......@@ -5443,7 +5443,7 @@ syms_of_buffer (void)
{
staticpro (&last_overlay_modification_hooks);
last_overlay_modification_hooks
= Fmake_vector (make_number (10), Qnil);
= Fmake_vector (make_fixnum (10), Qnil);
staticpro (&QSFundamental);
staticpro (&Vbuffer_alist);
......
......@@ -295,7 +295,7 @@ extern void enlarge_buffer_text (struct buffer *, ptrdiff_t);
do \
{ \
Lisp_Object __pos = (pos); \
if (NUMBERP (__pos)) \
if (FIXED_OR_FLOATP (__pos)) \
{ \
charpos = __pos; \
bytepos = buf_charpos_to_bytepos (current_buffer, __pos); \
......@@ -1387,7 +1387,7 @@ downcase (int c)
{
Lisp_Object downcase_table = BVAR (current_buffer, downcase_table);
Lisp_Object down = CHAR_TABLE_REF (downcase_table, c);
return NATNUMP (down) ? XFASTINT (down) : c;
return FIXNATP (down) ? XFASTINT (down) : c;
}
/* Upcase a character C, or make no change if that cannot be done. */
......@@ -1396,7 +1396,7 @@ upcase (int c)
{
Lisp_Object upcase_table = BVAR (current_buffer, upcase_table);
Lisp_Object up = CHAR_TABLE_REF (upcase_table, c);
return NATNUMP (up) ? XFASTINT (up) : c;
return FIXNATP (up) ? XFASTINT (up) : c;
}
/* True if C is upper case. */
......
......@@ -346,7 +346,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
CHECK_STRING (bytestr);
CHECK_VECTOR (vector);
CHECK_NATNUM (maxdepth);
CHECK_FIXNAT (maxdepth);
ptrdiff_t const_length = ASIZE (vector);
......@@ -378,7 +378,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
if (!NILP (args_template))
{
eassert (INTEGERP (args_template));
eassert (FIXNUMP (args_template));
ptrdiff_t at = XINT (args_template);
bool rest = (at & 128) != 0;
int mandatory = at & 127;
......@@ -386,8 +386,8 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
ptrdiff_t maxargs = rest ? PTRDIFF_MAX : nonrest;
if (! (mandatory <= nargs && nargs <= maxargs))
Fsignal (Qwrong_number_of_arguments,
list2 (Fcons (make_number (mandatory), make_number (nonrest)),
make_number (nargs)));
list2 (Fcons (make_fixnum (mandatory), make_fixnum (nonrest)),
make_fixnum (nargs)));
ptrdiff_t pushedargs = min (nonrest, nargs);
for (ptrdiff_t i = 0; i < pushedargs; i++, args++)
PUSH (*args);
......@@ -621,7 +621,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
{
Lisp_Object v1 = TOP;
Lisp_Object v2 = Fget (v1, Qbyte_code_meter);
if (INTEGERP (v2)
if (FIXNUMP (v2)
&& XINT (v2) < MOST_POSITIVE_FIXNUM)
{
XSETINT (v2, XINT (v2) + 1);
......@@ -832,7 +832,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
CASE (Bnth):
{
Lisp_Object v2 = POP, v1 = TOP;
CHECK_NUMBER (v1);
CHECK_FIXNUM (v1);
for (EMACS_INT n = XINT (v1); 0 < n && CONSP (v2); n--)
{
v2 = XCDR (v2);
......@@ -972,11 +972,11 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
NEXT;
CASE (Bsub1):
TOP = INTEGERP (TOP) ? make_number (XINT (TOP) - 1) : Fsub1 (TOP);
TOP = FIXNUMP (TOP) ? make_fixnum (XINT (TOP) - 1) : Fsub1 (TOP);
NEXT;
CASE (Badd1):
TOP = INTEGERP (TOP) ? make_number (XINT (TOP) + 1) : Fadd1 (TOP);
TOP = FIXNUMP (TOP) ? make_fixnum (XINT (TOP) + 1) : Fadd1 (TOP);
NEXT;
CASE (Beqlsign):
......@@ -986,8 +986,8 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
TOP = arithcompare (v1, v2, ARITH_EQUAL);
else
{
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v1);
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v2);
CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (v1);
CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (v2);
TOP = EQ (v1, v2) ? Qt : Qnil;
}
NEXT;
......@@ -1027,7 +1027,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
NEXT;
CASE (Bnegate):
TOP = INTEGERP (TOP) ? make_number (- XINT (TOP)) : Fminus (1, &TOP);
TOP = FIXNUMP (TOP) ? make_fixnum (- XINT (TOP)) : Fminus (1, &TOP);
NEXT;
CASE (Bplus):
......@@ -1063,7 +1063,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
}
CASE (Bpoint):
PUSH (make_natnum (PT));
PUSH (make_fixed_natnum (PT));
NEXT;
CASE (Bgoto_char):
......@@ -1089,7 +1089,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
}
CASE (Bpoint_min):
PUSH (make_natnum (BEGV));
PUSH (make_fixed_natnum (BEGV));
NEXT;
CASE (Bchar_after):
......@@ -1105,7 +1105,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
NEXT;
CASE (Bcurrent_column):
PUSH (make_natnum (current_column ()));
PUSH (make_fixed_natnum (current_column ()));
NEXT;
CASE (Bindent_to):
......@@ -1262,7 +1262,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
{
/* Exchange args and then do nth. */
Lisp_Object v2 = POP, v1 = TOP;
CHECK_NUMBER (v2);
CHECK_FIXNUM (v2);
for (EMACS_INT n = XINT (v2); 0 < n && CONSP (v1); n--)
{
v1 = XCDR (v1);
......@@ -1324,11 +1324,11 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
NEXT;
CASE (Bnumberp):
TOP = NUMBERP (TOP) ? Qt : Qnil;
TOP = FIXED_OR_FLOATP (TOP) ? Qt : Qnil;
NEXT;
CASE (Bintegerp):
TOP = INTEGERP (TOP) ? Qt : Qnil;
TOP = FIXNUMP (TOP) ? Qt : Qnil;
NEXT;
#if BYTE_CODE_SAFE
......@@ -1415,7 +1415,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
{ /* Do a linear search if there are not many cases
FIXME: 5 is arbitrarily chosen. */
Lisp_Object hash_code = h->test.cmpfn
? make_number (h->test.hashfn (&h->test, v1)) : Qnil;
? make_fixnum (h->test.hashfn (&h->test, v1)) : Qnil;
for (i = h->count; 0 <= --i; )
if (EQ (v1, HASH_KEY (h, i))
......@@ -1431,7 +1431,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
if (i >= 0)
{
Lisp_Object val = HASH_VALUE (h, i);
if (BYTE_CODE_SAFE && !INTEGERP (val))
if (BYTE_CODE_SAFE && !FIXNUMP (val))