From 31ca1c3e81b26357692c4c2428744f7f2f153596 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 6 May 2021 10:26:33 +0200 Subject: [PATCH] =?utf8?q?Rename=20comp-never-optimize-functions=20?= =?utf8?q?=E2=86=92=20native-comp-never-optimize-functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * lisp/emacs-lisp/nadvice.el (advice--add-function): Rename comp-never-optimize-functions → native-comp-never-optimize-functions. * lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions) (comp-subr-trampoline-install, comp-call-optim-form-call): Likewise. --- lisp/emacs-lisp/comp.el | 6 +++--- lisp/emacs-lisp/nadvice.el | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 621bb81455d..b1b55914043 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -98,7 +98,7 @@ during bootstrap." :type '(repeat regexp) :version "28.1") -(defcustom comp-never-optimize-functions +(defcustom native-comp-never-optimize-functions '(;; The following two are mandatory for Emacs to be working ;; correctly (see comment in `advice--add-function'). DO NOT ;; REMOVE. @@ -662,7 +662,7 @@ Useful to hook into pass checkers.") (defun comp-subr-trampoline-install (subr-name) "Make SUBR-NAME effectively advice-able when called from native code." (unless (or (null comp-enable-subr-trampolines) - (memq subr-name comp-never-optimize-functions) + (memq subr-name native-comp-never-optimize-functions) (gethash subr-name comp-installed-trampolines-h)) (cl-assert (subr-primitive-p (symbol-function subr-name))) (comp--install-trampoline @@ -3275,7 +3275,7 @@ FUNCTION can be a function-name or byte compiled function." (when (and callee (or (symbolp callee) (gethash callee (comp-ctxt-byte-func-to-func-h comp-ctxt))) - (not (memq callee comp-never-optimize-functions))) + (not (memq callee native-comp-never-optimize-functions))) (let* ((f (if (symbolp callee) (symbol-function callee) (cl-assert (byte-code-function-p callee)) diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index 747572a3363..bf3e9446399 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -324,13 +324,13 @@ is also interactive. There are 3 cases: (subr-primitive-p (gv-deref ref))) (let ((subr-name (intern (subr-name (gv-deref ref))))) ;; Requiring the native compiler to advice `macroexpand' cause a - ;; circular dependency in eager macro expansion. - ;; uniquify is advising `rename-buffer' while being loaded in - ;; loadup.el. This would require the whole native compiler - ;; machinery but we don't want to include it in the dump. - ;; Because these two functions are already handled in - ;; `comp-never-optimize-functions' we hack the problem this way - ;; for now :/ + ;; circular dependency in eager macro expansion. uniquify is + ;; advising `rename-buffer' while being loaded in loadup.el. + ;; This would require the whole native compiler machinery but we + ;; don't want to include it in the dump. Because these two + ;; functions are already handled in + ;; `native-comp-never-optimize-functions' we hack the problem + ;; this way for now :/ (unless (memq subr-name '(macroexpand rename-buffer)) ;; Must require explicitly as during bootstrap we have no ;; autoloads. -- 2.39.5