diff options
| author | Pip Cet | 2024-12-11 22:31:07 +0000 |
|---|---|---|
| committer | Andrea Corallo | 2025-09-22 10:28:40 +0200 |
| commit | 020e2f5ddbbc2f380f694e1537aaa8405daf5829 (patch) | |
| tree | cb773d9142a1e9bd79baf03c5c2670cedc53bef3 /src/data.c | |
| parent | e58efac78eed96842e4b6cbc64a1633e74edd6c1 (diff) | |
| download | emacs-020e2f5ddbbc2f380f694e1537aaa8405daf5829.tar.gz emacs-020e2f5ddbbc2f380f694e1537aaa8405daf5829.zip | |
Change EQ to move slow code path into a separate function
* src/data.c (slow_eq): New function.
* src/lisp.h (EQ): Call it.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/data.c b/src/data.c index 5b3c9792ea0..333d908aedc 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -155,6 +155,16 @@ circular_list (Lisp_Object list) | |||
| 155 | 155 | ||
| 156 | /* Data type predicates. */ | 156 | /* Data type predicates. */ |
| 157 | 157 | ||
| 158 | /* NO_INLINE to avoid excessive code growth when LTO is in use. */ | ||
| 159 | NO_INLINE bool | ||
| 160 | slow_eq (Lisp_Object x, Lisp_Object y) | ||
| 161 | { | ||
| 162 | return BASE_EQ ((symbols_with_pos_enabled && SYMBOL_WITH_POS_P (x) | ||
| 163 | ? XSYMBOL_WITH_POS_SYM (x) : x), | ||
| 164 | (symbols_with_pos_enabled && SYMBOL_WITH_POS_P (y) | ||
| 165 | ? XSYMBOL_WITH_POS_SYM (y) : y)); | ||
| 166 | } | ||
| 167 | |||
| 158 | DEFUN ("eq", Feq, Seq, 2, 2, 0, | 168 | DEFUN ("eq", Feq, Seq, 2, 2, 0, |
| 159 | doc: /* Return t if the two args are the same Lisp object. */ | 169 | doc: /* Return t if the two args are the same Lisp object. */ |
| 160 | attributes: const) | 170 | attributes: const) |