aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Corallo2023-02-13 16:33:40 +0100
committerAndrea Corallo2023-02-13 17:02:38 +0100
commit5d0912f1445e33f1ccf23a84f0dc6d08c4ee2b60 (patch)
treefa6408320ec69d65cc13c77715c06a11c0619cb7
parentabfd00e5c02ec0aed8bbac1eca0d0db1874f020a (diff)
downloademacs-5d0912f1445e33f1ccf23a84f0dc6d08c4ee2b60.tar.gz
emacs-5d0912f1445e33f1ccf23a84f0dc6d08c4ee2b60.zip
Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines
* src/data.c (Ffset): Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines. * src/comp.c (syms_of_comp): Likewise. * lisp/subr.el (comp-enable-subr-trampolines): Make comp-enable-subr-trampolines obsolete. * lisp/startup.el (native-comp-enable-subr-trampolines) (normal-top-level): Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines. * lisp/loadup.el (dump-mode): Likewise. * lisp/emacs-lisp/comp.el (comp-subr-trampoline-install) (comp--trampoline-abs-filename): Likewise.
-rw-r--r--lisp/emacs-lisp/comp.el6
-rw-r--r--lisp/loadup.el2
-rw-r--r--lisp/startup.el4
-rw-r--r--lisp/subr.el4
-rw-r--r--src/comp.c3
-rw-r--r--src/data.c2
6 files changed, 13 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 5077ca0aa1f..fc1862a45e8 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -700,7 +700,7 @@ Useful to hook into pass checkers.")
700;;;###autoload 700;;;###autoload
701(defun comp-subr-trampoline-install (subr-name) 701(defun comp-subr-trampoline-install (subr-name)
702 "Make SUBR-NAME effectively advice-able when called from native code." 702 "Make SUBR-NAME effectively advice-able when called from native code."
703 (unless (or (null comp-enable-subr-trampolines) 703 (unless (or (null native-comp-enable-subr-trampolines)
704 (memq subr-name native-comp-never-optimize-functions) 704 (memq subr-name native-comp-never-optimize-functions)
705 (gethash subr-name comp-installed-trampolines-h)) 705 (gethash subr-name comp-installed-trampolines-h))
706 (cl-assert (subr-primitive-p (symbol-function subr-name))) 706 (cl-assert (subr-primitive-p (symbol-function subr-name)))
@@ -3790,8 +3790,8 @@ Return the trampoline if found or nil otherwise."
3790(defun comp--trampoline-abs-filename (subr-name) 3790(defun comp--trampoline-abs-filename (subr-name)
3791 "Return the absolute filename for a trampoline for SUBR-NAME." 3791 "Return the absolute filename for a trampoline for SUBR-NAME."
3792 (cl-loop 3792 (cl-loop
3793 with dirs = (if (stringp comp-enable-subr-trampolines) 3793 with dirs = (if (stringp native-comp-enable-subr-trampolines)
3794 (list comp-enable-subr-trampolines) 3794 (list native-comp-enable-subr-trampolines)
3795 (if native-compile-target-directory 3795 (if native-compile-target-directory
3796 (list (expand-file-name comp-native-version-dir 3796 (list (expand-file-name comp-native-version-dir
3797 native-compile-target-directory)) 3797 native-compile-target-directory))
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 5c576861579..46b26750cd5 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -550,7 +550,7 @@ lost after dumping")))
550 (equal dump-mode "pdump")) 550 (equal dump-mode "pdump"))
551 ;; Don't enable this before bootstrap is completed, as the 551 ;; Don't enable this before bootstrap is completed, as the
552 ;; compiler infrastructure may not be usable yet. 552 ;; compiler infrastructure may not be usable yet.
553 (setq comp-enable-subr-trampolines t)) 553 (setq native-comp-enable-subr-trampolines t))
554 (message "Dumping under the name %s" output) 554 (message "Dumping under the name %s" output)
555 (condition-case () 555 (condition-case ()
556 (delete-file output) 556 (delete-file output)
diff --git a/lisp/startup.el b/lisp/startup.el
index 240cfa30098..ddbb39df857 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -543,7 +543,7 @@ DIRS are relative."
543 543
544(defvar native-comp-eln-load-path) 544(defvar native-comp-eln-load-path)
545(defvar native-comp-deferred-compilation) 545(defvar native-comp-deferred-compilation)
546(defvar comp-enable-subr-trampolines) 546(defvar native-comp-enable-subr-trampolines)
547 547
548(defvar startup--original-eln-load-path nil 548(defvar startup--original-eln-load-path nil
549 "Original value of `native-comp-eln-load-path'.") 549 "Original value of `native-comp-eln-load-path'.")
@@ -598,7 +598,7 @@ It is the default value of the variable `top-level'."
598 ;; available on MS-Windows, but Emacs was built with 598 ;; available on MS-Windows, but Emacs was built with
599 ;; native-compilation support. 599 ;; native-compilation support.
600 (setq native-comp-deferred-compilation nil 600 (setq native-comp-deferred-compilation nil
601 comp-enable-subr-trampolines nil)) 601 native-comp-enable-subr-trampolines nil))
602 602
603 ;; Form `native-comp-eln-load-path'. 603 ;; Form `native-comp-eln-load-path'.
604 (let ((path-env (getenv "EMACSNATIVELOADPATH"))) 604 (let ((path-env (getenv "EMACSNATIVELOADPATH")))
diff --git a/lisp/subr.el b/lisp/subr.el
index a56aeab724a..56c8377da87 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1894,6 +1894,10 @@ activations. To prevent runaway recursion, use `max-lisp-eval-depth'
1894instead; it will indirectly limit the specpdl stack size as well.") 1894instead; it will indirectly limit the specpdl stack size as well.")
1895(make-obsolete-variable 'max-specpdl-size nil "29.1") 1895(make-obsolete-variable 'max-specpdl-size nil "29.1")
1896 1896
1897(make-obsolete-variable 'comp-enable-subr-trampolines
1898 'native-comp-enable-subr-trampolines
1899 "29.1")
1900
1897 1901
1898;;;; Alternate names for functions - these are not being phased out. 1902;;;; Alternate names for functions - these are not being phased out.
1899 1903
diff --git a/src/comp.c b/src/comp.c
index 82224845bff..ba3ed95bcce 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -5858,7 +5858,8 @@ The last directory of this list is assumed to be the system one. */);
5858 dump reload. */ 5858 dump reload. */
5859 Vnative_comp_eln_load_path = Fcons (build_string ("../native-lisp/"), Qnil); 5859 Vnative_comp_eln_load_path = Fcons (build_string ("../native-lisp/"), Qnil);
5860 5860
5861 DEFVAR_LISP ("comp-enable-subr-trampolines", Vcomp_enable_subr_trampolines, 5861 DEFVAR_LISP ("native-comp-enable-subr-trampolines",
5862 Vnative_comp_enable_subr_trampolines,
5862 doc: /* If non-nil, enable primitive trampoline synthesis. 5863 doc: /* If non-nil, enable primitive trampoline synthesis.
5863This makes Emacs respect redefinition or advises of primitive functions 5864This makes Emacs respect redefinition or advises of primitive functions
5864when they are called from Lisp code natively-compiled at `native-comp-speed' 5865when they are called from Lisp code natively-compiled at `native-comp-speed'
diff --git a/src/data.c b/src/data.c
index a43fa8991fe..0f1d881e00b 100644
--- a/src/data.c
+++ b/src/data.c
@@ -855,7 +855,7 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
855#ifdef HAVE_NATIVE_COMP 855#ifdef HAVE_NATIVE_COMP
856 register Lisp_Object function = XSYMBOL (symbol)->u.s.function; 856 register Lisp_Object function = XSYMBOL (symbol)->u.s.function;
857 857
858 if (!NILP (Vcomp_enable_subr_trampolines) 858 if (!NILP (Vnative_comp_enable_subr_trampolines)
859 && SUBRP (function) 859 && SUBRP (function)
860 && !SUBR_NATIVE_COMPILEDP (function)) 860 && !SUBR_NATIVE_COMPILEDP (function))
861 CALLN (Ffuncall, Qcomp_subr_trampoline_install, symbol); 861 CALLN (Ffuncall, Qcomp_subr_trampoline_install, symbol);