[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Excessive use of `eassert`
|
From: |
Stefan Monnier |
|
Subject: |
Re: Excessive use of `eassert` |
|
Date: |
Mon, 22 Jan 2024 08:20:13 -0500 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> Thanks, I reproduced that on Ubuntu 23.10 on x86-64 by configuring
> with --enable-checking and compiling with gcc -O0.
FWIW, I never compile with `-O0`, it's usually`-Og`.
And on i386 I saw it with `-O2` as well :-(
> +/* 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)
[...]
> +(builtin_lisp_symbol) (int index)
> {
> - return make_lisp_symbol (&lispsym[index]);
> + return lisp_h_builtin_lisp_symbol (index);
> }
Hmm... Compared to the patch I proposed this has the downside that it
duplicates the logic between `lisp_h_builtin_lisp_symbol` and
`make_lisp_symbol` (worse: the logic is actually not the same, so it's
not obvious that it ends up returning the same thing).
Stefan
- Re: Excessive use of `eassert`, (continued)
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/22
- Re: Excessive use of `eassert`, Stefan Monnier, 2024/01/22
- Re: Excessive use of `eassert`, Alan Mackenzie, 2024/01/22
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/23
- Re: Excessive use of `eassert`, Alan Mackenzie, 2024/01/23
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/23
- Re: Excessive use of `eassert`, Alan Mackenzie, 2024/01/24
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/26
- Re: Excessive use of `eassert`, Stefan Monnier, 2024/01/21
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/21
- Re: Excessive use of `eassert`,
Stefan Monnier <=
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/23
- Re: Excessive use of `eassert`, Stefan Monnier, 2024/01/23
- Re: Excessive use of `eassert`, Paul Eggert, 2024/01/24
- Re: Excessive use of `eassert`, Eli Zaretskii, 2024/01/23
- Re: Excessive use of `eassert`, Stefan Monnier, 2024/01/23