]> git.eshelyaron.com Git - emacs.git/commit
Faster and less wrong cl-defsubst inlining
authorMattias Engdegård <mattiase@acm.org>
Thu, 13 Apr 2023 18:21:11 +0000 (20:21 +0200)
committerMattias Engdegård <mattiase@acm.org>
Thu, 13 Apr 2023 19:32:10 +0000 (21:32 +0200)
commit6a7532cfcb913cc20ec156492b415e84d56fd11a
tree5cf715945c1b73eeddd5d073844f2f85c044cda5
parent83b5e9cd24ddcbb04dbd5db9a07248ff7fa301ab
Faster and less wrong cl-defsubst inlining

Always have inlining of functions defined by `cl-defsubst` let-bind
arguments instead of making incorrect guesses when it might be safe to
substitute them and then botching the substitution.

This change generally results in better and safer code for all
callers, in particular `cl-defstruct` constructors, accessors and
mutators.

* lisp/emacs-lisp/cl-macs.el (cl-defsubst): Remove outdated comment.
(cl--defsubst-expand): Simplify: always let-bind.
(cl--sublis): Remove.
(cl-defstruct): Simplify: remove old hack that is no longer needed.
lisp/emacs-lisp/cl-macs.el