From: Paul Eggert Date: Sun, 21 Jan 2024 00:52:31 +0000 (-0800) Subject: Simplify and tune XSYMBOL X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~2882 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cf26f573162130fed73c6e5603cb58e158903add;p=emacs.git Simplify and tune XSYMBOL * src/lisp.h (XSYMBOL): Simplify and tune. There is no need to examine symbols_with_pos_enabled here, since the arg must be a symbol so if it's not a bare symbol then it must be a symbol_with_pos; and checking whether a symbol is bare is cheap. With Ubuntu 23.10 on a Xeon W-1350, this shrank Emacs’s executable text size by 0.1% and sped up a default build of all *.elc files by 0.4%. Remove unnecessary eassert, since XBARE_SYMBOL and XSYMBOL_WITH_POS have easserts that suffice. --- diff --git a/src/lisp.h b/src/lisp.h index 20b28e93c8d..c3309c81a16 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1156,10 +1156,7 @@ XBARE_SYMBOL (Lisp_Object a) INLINE struct Lisp_Symbol * ATTRIBUTE_NO_SANITIZE_UNDEFINED XSYMBOL (Lisp_Object a) { - eassert (SYMBOLP (a)); - if (!symbols_with_pos_enabled || BARE_SYMBOL_P (a)) - return XBARE_SYMBOL (a); - return XBARE_SYMBOL (XSYMBOL_WITH_POS (a)->sym); + return XBARE_SYMBOL (BARE_SYMBOL_P (a) ? a : XSYMBOL_WITH_POS (a)->sym); } INLINE Lisp_Object