summaryrefslogtreecommitdiff
path: root/src/comp.c
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2023-02-13 11:09:46 +0100
committerAndrea Corallo <akrl@sdf.org>2023-02-13 12:48:09 +0100
commit1795839babcf8572a79aaee3c76ca5b357937a59 (patch)
treee4f572276a12cc11cec8cac6e29864ce89ad3b0c /src/comp.c
parentb6e2799aa1c3887c2995e115e6ff2f69d59f0e44 (diff)
downloademacs-1795839babcf8572a79aaee3c76ca5b357937a59.tar.gz
emacs-1795839babcf8572a79aaee3c76ca5b357937a59.tar.bz2
emacs-1795839babcf8572a79aaee3c76ca5b357937a59.zip
Support `comp-enable-subr-trampolines' as string value
* src/comp.c (syms_of_comp): Update `comp-enable-subr-trampolines'. * lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions) (comp--trampoline-abs-filename): Support `comp-enable-subr-trampolines' string value. * src/data.c (Ffset): Use Vcomp_enable_subr_trampolines now.
Diffstat (limited to 'src/comp.c')
-rw-r--r--src/comp.c5
1 files changed, 4 insertions, 1 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.