emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp 21021e5 2/2: * Fix defsbust declare effectiveness in


From: Andrea Corallo
Subject: feature/native-comp 21021e5 2/2: * Fix defsbust declare effectiveness introduced by 80d7f710 (Bug#43280).
Date: Sun, 13 Sep 2020 12:55:32 -0400 (EDT)

branch: feature/native-comp
commit 21021e56ad609a459ec117bcfc60b2802176a9a7
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    * Fix defsbust declare effectiveness introduced by 80d7f710 (Bug#43280).
    
        * lisp/emacs-lisp/byte-run.el (defsubst): Do not add a speed
        declaration as this breaks a pre existing ones if present but
        rather calls directly `byte-run--set-speed'.
---
 lisp/emacs-lisp/byte-run.el | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 8c16c17..df693ab 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -363,13 +363,12 @@ 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
-         ;; Never native-compile defsubsts as we need the byte
-         ;; definition in `byte-compile-unfold-bcf' to perform the
-         ;; inlining (Bug#42664).
-         (declare (speed -1))
-         ,@body)
+       (defun ,name ,arglist ,@body)
      (eval-and-compile
        (put ',name 'byte-optimizer 'byte-compile-inline-expand))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]