& ((1 << INTTYPEBITS) - 1)))
#define lisp_h_FLOATP(x) TAGGEDP (x, Lisp_Float)
#define lisp_h_NILP(x) BASE_EQ (x, Qnil)
-/* Equivalent to "make_lisp_symbol (&lispsym[INDEX])",
- and typically faster when compiling without optimization. */
-#define lisp_h_builtin_lisp_symbol(index) \
- TAG_PTR (Lisp_Symbol, (index) * sizeof *lispsym)
#define lisp_h_SET_SYMBOL_VAL(sym, v) \
(eassert ((sym)->u.s.redirect == SYMBOL_PLAINVAL), \
(sym)->u.s.val.value = (v))
# define FLOATP(x) lisp_h_FLOATP (x)
# define FIXNUMP(x) lisp_h_FIXNUMP (x)
# define NILP(x) lisp_h_NILP (x)
-# define builtin_lisp_symbol(index) lisp_h_builtin_lisp_symbol (index)
# define SET_SYMBOL_VAL(sym, v) lisp_h_SET_SYMBOL_VAL (sym, v)
# define SYMBOL_CONSTANT_P(sym) lisp_h_SYMBOL_CONSTANT_P (sym)
# define SYMBOL_TRAPPED_WRITE_P(sym) lisp_h_SYMBOL_TRAPPED_WRITE_P (sym)
return XBARE_SYMBOL (a);
}
+/* Internal use only. */
INLINE Lisp_Object
-make_lisp_symbol (struct Lisp_Symbol *sym)
+make_lisp_symbol_internal (struct Lisp_Symbol *sym)
{
/* GCC 7 x86-64 generates faster code if lispsym is
- cast to char * rather than to intptr_t. */
+ cast to char * rather than to intptr_t.
+ Do not use eassert here, so that builtin symbols like Qnil compile to
+ constants; this is needed for some circa-2024 GCCs even with -O2. */
char *symoffset = (char *) ((char *) sym - (char *) lispsym);
- Lisp_Object a = TAG_PTR (Lisp_Symbol, symoffset);
+ return TAG_PTR (Lisp_Symbol, symoffset);
+}
+
+INLINE Lisp_Object
+make_lisp_symbol (struct Lisp_Symbol *sym)
+{
+ Lisp_Object a = make_lisp_symbol_internal (sym);
eassert (XBARE_SYMBOL (a) == sym);
return a;
}
INLINE Lisp_Object
-(builtin_lisp_symbol) (int index)
+builtin_lisp_symbol (int index)
{
- return lisp_h_builtin_lisp_symbol (index);
+ return make_lisp_symbol_internal (&lispsym[index]);
}
INLINE bool