summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/comp.c5
-rw-r--r--src/data.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/comp.c b/src/comp.c
index 7d67995fa87..82224845bff 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -5858,12 +5858,15 @@ 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_BOOL ("comp-enable-subr-trampolines", comp_enable_subr_trampolines,
+ DEFVAR_LISP ("comp-enable-subr-trampolines", Vcomp_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'
of 2.
+If `comp-enable-subr-trampolines' is a string it specifies a directory
+in which to deposit the trampoline.
+
By default, this is enabled, and when Emacs sees a redefined or advised
primitive called from natively-compiled Lisp, it generates a trampoline
for it on-the-fly.
diff --git a/src/data.c b/src/data.c
index bb4d1347d72..a43fa8991fe 100644
--- a/src/data.c
+++ b/src/data.c
@@ -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 (comp_enable_subr_trampolines
+ if (!NILP (Vcomp_enable_subr_trampolines)
&& SUBRP (function)
&& !SUBR_NATIVE_COMPILEDP (function))
CALLN (Ffuncall, Qcomp_subr_trampoline_install, symbol);