]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines
authorAndrea Corallo <akrl@sdf.org>
Mon, 13 Feb 2023 15:33:40 +0000 (16:33 +0100)
committerAndrea Corallo <akrl@sdf.org>
Mon, 13 Feb 2023 16:02:38 +0000 (17:02 +0100)
* 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.

lisp/emacs-lisp/comp.el
lisp/loadup.el
lisp/startup.el
lisp/subr.el
src/comp.c
src/data.c

index 5077ca0aa1f92f3015c1f46574c4d9e1c926a136..fc1862a45e868a831481e9deeae0311e7d09c4dc 100644 (file)
@@ -700,7 +700,7 @@ Useful to hook into pass checkers.")
 ;;;###autoload
 (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)
+  (unless (or (null native-comp-enable-subr-trampolines)
               (memq subr-name native-comp-never-optimize-functions)
               (gethash subr-name comp-installed-trampolines-h))
     (cl-assert (subr-primitive-p (symbol-function subr-name)))
@@ -3790,8 +3790,8 @@ Return the trampoline if found or nil otherwise."
 (defun comp--trampoline-abs-filename (subr-name)
   "Return the absolute filename for a trampoline for SUBR-NAME."
   (cl-loop
-   with dirs = (if (stringp comp-enable-subr-trampolines)
-                   (list comp-enable-subr-trampolines)
+   with dirs = (if (stringp native-comp-enable-subr-trampolines)
+                   (list native-comp-enable-subr-trampolines)
                  (if native-compile-target-directory
                      (list (expand-file-name comp-native-version-dir
                                              native-compile-target-directory))
index 5c57686157938248b28f3c66453dd247afa6b3fd..46b26750cd527a4d41393ae6d202fde0e6f80e91 100644 (file)
@@ -550,7 +550,7 @@ lost after dumping")))
                  (equal dump-mode "pdump"))
         ;; Don't enable this before bootstrap is completed, as the
         ;; compiler infrastructure may not be usable yet.
-        (setq comp-enable-subr-trampolines t))
+        (setq native-comp-enable-subr-trampolines t))
       (message "Dumping under the name %s" output)
       (condition-case ()
           (delete-file output)
index 240cfa30098f904a557f4206c9eba871f89399fb..ddbb39df857eac2a1cdf31dc55d24a2394f1062a 100644 (file)
@@ -543,7 +543,7 @@ DIRS are relative."
 
 (defvar native-comp-eln-load-path)
 (defvar native-comp-deferred-compilation)
-(defvar comp-enable-subr-trampolines)
+(defvar native-comp-enable-subr-trampolines)
 
 (defvar startup--original-eln-load-path nil
   "Original value of `native-comp-eln-load-path'.")
@@ -598,7 +598,7 @@ It is the default value of the variable `top-level'."
         ;; available on MS-Windows, but Emacs was built with
         ;; native-compilation support.
         (setq native-comp-deferred-compilation nil
-              comp-enable-subr-trampolines nil))
+              native-comp-enable-subr-trampolines nil))
 
       ;; Form `native-comp-eln-load-path'.
       (let ((path-env (getenv "EMACSNATIVELOADPATH")))
index a56aeab724a551bd09dee446a40e23255517d32c..56c8377da8766fd1b97ee10dc13163aa8b8443ba 100644 (file)
@@ -1894,6 +1894,10 @@ activations.  To prevent runaway recursion, use `max-lisp-eval-depth'
 instead; it will indirectly limit the specpdl stack size as well.")
 (make-obsolete-variable 'max-specpdl-size nil "29.1")
 
+(make-obsolete-variable 'comp-enable-subr-trampolines
+                        'native-comp-enable-subr-trampolines
+                        "29.1")
+
 \f
 ;;;; Alternate names for functions - these are not being phased out.
 
index 82224845bff64a6feee0ac5087ff3e56bdf8c437..ba3ed95bcce86e21afabe3708d3cf35ea09bd1e2 100644 (file)
@@ -5858,7 +5858,8 @@ The last directory of this list is assumed to be the system one.  */);
      dump reload.  */
   Vnative_comp_eln_load_path = Fcons (build_string ("../native-lisp/"), Qnil);
 
-  DEFVAR_LISP ("comp-enable-subr-trampolines", Vcomp_enable_subr_trampolines,
+  DEFVAR_LISP ("native-comp-enable-subr-trampolines",
+              Vnative_comp_enable_subr_trampolines,
               doc: /* If non-nil, enable primitive trampoline synthesis.
 This makes Emacs respect redefinition or advises of primitive functions
 when they are called from Lisp code natively-compiled at `native-comp-speed'
index a43fa8991fe54eb1559d876b430f29c383eb64ff..0f1d881e00b14bcb281eff93d61e0689e919231a 100644 (file)
@@ -855,7 +855,7 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
 #ifdef HAVE_NATIVE_COMP
   register Lisp_Object function = XSYMBOL (symbol)->u.s.function;
 
-  if (!NILP (Vcomp_enable_subr_trampolines)
+  if (!NILP (Vnative_comp_enable_subr_trampolines)
       && SUBRP (function)
       && !SUBR_NATIVE_COMPILEDP (function))
     CALLN (Ffuncall, Qcomp_subr_trampoline_install, symbol);