]> git.eshelyaron.com Git - emacs.git/commit
Remove lisp_h_XCONS etc
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Feb 2024 17:54:51 +0000 (09:54 -0800)
committerEshel Yaron <me@eshelyaron.com>
Wed, 14 Feb 2024 08:15:40 +0000 (09:15 +0100)
commitdedadfecf0b90d864e0df0e7774d8b35204f8352
tree24aae0c4cfb4591e93398d92daba5e9ff4ca9302
parent5402ac2d74395e6d1d63743c9f7f47b33bbe6ac5
Remove lisp_h_XCONS etc

When configured with --enable-checking and compiled with gcc -O0,
these macros evaluated arguments multiple times, which made it too
easy to mistakenly write code that behaves differently when debugging.
This patch does not affect performance in normal builds.
In --enable-checking builds with gcc -O0 it slows down my usual
benchmark (remove all '*.elc’ files and then 'make') by 4.4%.
I hope that’s good enough; if not I can complicate the macros to
tune better for debugging builds.
* src/lisp.h (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_VAL)
(lisp_h_XCONS): Remove, moving each definiens to the corresponding
inline function.  All uses removed.

(cherry picked from commit 473dac880105cf6055a185eb3b9764243f27697c)
src/lisp.h