;;;###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)))
(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))
(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)
(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'.")
;; 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")))
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.
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'
#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);