summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-10-25 21:19:25 +0000
committerAndrea Corallo <akrl@sdf.org>2020-10-25 22:56:50 +0000
commit5edc7aa0193ec73f757e85012273c159301f64a9 (patch)
tree13fd01b05cd9f353c140cd56b666e8d72baa01ec /lisp/emacs-lisp
parent096c78523d849a75847152dff7458e883d668cb8 (diff)
downloademacs-5edc7aa0193ec73f757e85012273c159301f64a9.tar.gz
emacs-5edc7aa0193ec73f757e85012273c159301f64a9.tar.bz2
emacs-5edc7aa0193ec73f757e85012273c159301f64a9.zip
Fix defsubst effectiveness (bug#44209)
* lisp/emacs-lisp/byte-run.el (defsubst): Fix macro definition. * test/src/comp-tests.el (comp-test-defsubst): New testcase. * test/src/comp-test-funcs.el (comp-test-defsubst-f): New function.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/byte-run.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 042a26a2e31..1bc78391886 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -363,13 +363,13 @@ You don't need this. (See bytecomp.el commentary for more details.)
(or (memq (get name 'byte-optimizer)
'(nil byte-compile-inline-expand))
(error "`%s' is a primitive" name))
- ;; Never native-compile defsubsts as we need the byte
- ;; definition in `byte-compile-unfold-bcf' to perform the
- ;; inlining (Bug#42664).
- (byte-run--set-speed name nil -1)
`(prog1
(defun ,name ,arglist ,@body)
(eval-and-compile
+ ;; Never native-compile defsubsts as we need the byte
+ ;; definition in `byte-compile-unfold-bcf' to perform the
+ ;; inlining (Bug#42664, Bug#43280, Bug#44209).
+ ,(byte-run--set-speed name nil -1)
(put ',name 'byte-optimizer 'byte-compile-inline-expand))))
(defvar advertised-signature-table (make-hash-table :test 'eq :weakness 'key))