aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2022-01-27 12:57:16 +0200
committerEli Zaretskii2022-01-27 12:57:16 +0200
commitdae4fa998609af286ba7a8a2e2a2e77d22df1faa (patch)
tree3e4062795d56032f334407846cf20e09a2ed7391
parent9d34946e53afb928c1885df8fcb48d2618853708 (diff)
parentd0aac84b2a8d82042475aeeeba465d0d5fd6ad3d (diff)
downloademacs-dae4fa998609af286ba7a8a2e2a2e77d22df1faa.tar.gz
emacs-dae4fa998609af286ba7a8a2e2a2e77d22df1faa.zip
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
-rw-r--r--lisp/emacs-lisp/benchmark.el6
-rw-r--r--lisp/startup.el16
2 files changed, 15 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el
index c5f621c6c86..882b1d68c48 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."
121 (unless (or (natnump repetitions) (and repetitions (symbolp repetitions))) 121 (unless (or (natnump repetitions) (and repetitions (symbolp repetitions)))
122 (setq forms (cons repetitions forms) 122 (setq forms (cons repetitions forms)
123 repetitions 1)) 123 repetitions 1))
124 `(benchmark-call (byte-compile '(lambda () ,@forms)) ,repetitions)) 124 `(benchmark-call (,(if (native-comp-available-p)
125 'native-compile
126 'byte-compile)
127 '(lambda () ,@forms))
128 ,repetitions))
125 129
126;;;###autoload 130;;;###autoload
127(defun benchmark (repetitions form) 131(defun benchmark (repetitions form)
diff --git a/lisp/startup.el b/lisp/startup.el
index d90e7a7d26e..05d829396d6 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -525,12 +525,16 @@ DIRS are relative."
525 (files &optional recursively load selector)) 525 (files &optional recursively load selector))
526(defun startup--honor-delayed-native-compilations () 526(defun startup--honor-delayed-native-compilations ()
527 "Honor pending delayed deferred native compilations." 527 "Honor pending delayed deferred native compilations."
528 (when (and (native-comp-available-p) 528 (if (and (native-comp-available-p)
529 comp--delayed-sources) 529 comp--delayed-sources)
530 (require 'comp) 530 (progn
531 (setq comp--loadable t) 531 ;; Require comp before setting `comp--loadable' to break
532 (native--compile-async comp--delayed-sources nil 'late) 532 ;; circularity.
533 (setq comp--delayed-sources nil))) 533 (require 'comp)
534 (setq comp--loadable t)
535 (native--compile-async comp--delayed-sources nil 'late)
536 (setq comp--delayed-sources nil))
537 (setq comp--loadable t)))
534 538
535(defvar native-comp-eln-load-path) 539(defvar native-comp-eln-load-path)
536(defun normal-top-level () 540(defun normal-top-level ()