emacs-diffs
[Top][All Lists]
Advanced

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

master dae4fa9986 2/2: Merge branch 'master' of git.savannah.gnu.org:/sr


From: Eli Zaretskii
Subject: master dae4fa9986 2/2: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Date: Thu, 27 Jan 2022 05:57:31 -0500 (EST)

branch: master
commit dae4fa998609af286ba7a8a2e2a2e77d22df1faa
Merge: 9d34946e53 d0aac84b2a
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
---
 lisp/emacs-lisp/benchmark.el |  6 +++++-
 lisp/startup.el              | 16 ++++++++++------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el
index c5f621c6c8..882b1d68c4 100644
--- a/lisp/emacs-lisp/benchmark.el
+++ b/lisp/emacs-lisp/benchmark.el
@@ -121,7 +121,11 @@ result.  The overhead of the `lambda's is accounted for."
   (unless (or (natnump repetitions) (and repetitions (symbolp repetitions)))
     (setq forms (cons repetitions forms)
          repetitions 1))
-  `(benchmark-call (byte-compile '(lambda () ,@forms)) ,repetitions))
+  `(benchmark-call (,(if (native-comp-available-p)
+                         'native-compile
+                       'byte-compile)
+                    '(lambda () ,@forms))
+                   ,repetitions))
 
 ;;;###autoload
 (defun benchmark (repetitions form)
diff --git a/lisp/startup.el b/lisp/startup.el
index d90e7a7d26..05d829396d 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -525,12 +525,16 @@ DIRS are relative."
                   (files &optional recursively load selector))
 (defun startup--honor-delayed-native-compilations ()
   "Honor pending delayed deferred native compilations."
-  (when (and (native-comp-available-p)
-             comp--delayed-sources)
-    (require 'comp)
-    (setq comp--loadable t)
-    (native--compile-async comp--delayed-sources nil 'late)
-    (setq comp--delayed-sources nil)))
+  (if (and (native-comp-available-p)
+           comp--delayed-sources)
+      (progn
+        ;; Require comp before setting `comp--loadable' to break
+        ;; circularity.
+        (require 'comp)
+        (setq comp--loadable t)
+        (native--compile-async comp--delayed-sources nil 'late)
+        (setq comp--delayed-sources nil))
+    (setq comp--loadable t)))
 
 (defvar native-comp-eln-load-path)
 (defun normal-top-level ()



reply via email to

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